[SOLVED] Main Menu Making with buttons to switch to other scenes

How would I make a Main Menu with buttons that would be clickable to take you to a new scene

Thank you

Game I would like to put the Main Menu in:
https://playcanvas.com/editor/scene/1370622

Please see: [SOLVED] Switching scenes via button - #41 by yaustar

so with this https://playcanvas.com/project/437633/overview/changing-scenes

would i need the load scene helper or is that just there

Yes, you do need it. The post I linked to has a project that does pretty much what you want, a button that changes scenes.

ok i will go try it out on my game and if it works ill tell you thank you very much

it worked thank you very much

hey, I’m trying to do the same thing in my game, except after inserting the script, it’s giving me an error message:

Hi @hyunzlvr and welcome!

Based on the error, it looks like your entity has no button component.

If your entity has only an element component, you can add a button component as well. Alternatively, you can replace button with element in the script, to make it work without a button component.

huh, I thought I had added a button element, but I guess I left it out! this fixed things, thank you so much :slight_smile:

1 Like