[SOLVED] Code not working for collision to change scene

Hi! I apologize if I’m asking questions a lot but this will be my last.

My code doesn’t seem to work whenever I ‘bump’ into a specific collision to change into a different scene. The game does launch but the code doesn’t do anything, it’s just a regular wall.

Here’s the link of my game

Hi @iscm! I guess it is because the collisionLevelTwo script is not attached to the collisionNextLevel entity. Apart from that, I think the boolean on line 18 of the script should be set to true instead of false.

Thank you so much for replying, Albertos!

I followed what you said and there’ still no changes. It still hasn’t changed to another scene. I tried tweaking some of the codes and this appears

That’s not true, because at least the collision is working now.

You try to execute this.changeScenes(); but this function doesn’t exist in your script. That’s why you get that error. Maybe you can try to replace it with this.loadScene();, because that function does exist in your script.

Your right, the collision script did work. I apologize for that, I didn’t use the correct words to express my thoughts. However, this.loadScene(); does work! thank you so much Albertos, you have no idea how much you’ve helped me!

1 Like

No problem, I’m glad it works now. See you soon in the next topic! :grin: