Please help! the buttons are working but i do not understand why the game can't collect or get killed in the next scene

here is my file link

what code should be placed in the button or in the game to make it work! attached here is also the video of this error

thank you for the help

I don’t see the error?

check this video^

the game is working but is not able to collect coins, and dye

That looks like a logic issue where the collision event is not being listened to and destroying the coins.

From the documentation, you can track which events are fired on which component:

In this case, collisionStart is on the rigidbody, not the collision as done in your code.

so what code am i missing for this to work? im not exactly sure what to do

Actually, I’m wrong. Ignore my last message.

I’m playing the game scene and it looks like I’m collecting the coins fine

yes the game is fine its just the transition of the button when launch the start scene the game can’t collect the coins or die

is there a certain code that i am missing?

Looking at your scene loading code, it looks like you are using LoadScene which doesn’t initialise the scripts.

Check the code in

ChangingScenes.prototype.loadScene = function (sceneName) {
    // Get a reference to the scene's root object
    var oldHierarchy = ('Root');
    // Get the path to the scene
    var scene =;
    // Load the scenes entity hierarchy, function (err, scene) {
        if (!err) {
        } else {


This approach is generally not recommended as it relies on private API and would suggest to use instead as shown here:

will try this and update you if working thank you,

also under what scene should this code be?

im very confuse

Any where you have code for changing scenes