Adding a Play button on a new scene

I have been trying to make a main menu for my game but as soon as i think i got it it doesn’t work… i have looked for tutorials and help but no luck can anyone here help me out a bit???

Can you share the project and the issue that you are having? Have you seen these tutorials?

No i havent seen those before

Is there a reason for using the legacy scripting system?

It seems easier for me to use, the only problem i have is getting the scenes to change when you click play, i tried html but confused myself so i can here for help

Legacy scripting is no longer supported by the PlayCanvas and all the tutorials are made with Scripts 2.0 which is not making learning any easier for you.

At a brief look from your project, the hud.js script is not attached to any entity in the scene so that is not being executed. If you continue going down the HTML route, you want to also add a button with a on click callback to change scenes.

@yaustar ok i have an onclick button but does the callback work as like a file link?

Here’s an example of creating a callback on a HTML button click:

1 Like

Thank you for your help!