I’ve been trying to get my game so that when the player’s x position is less than the end point’s x position, the game switches from the level entity to the result entity. Basically a simple scene switch. I’ve tried putting this code inside the main level entity, and in the global root entity, but it keeps on freezing when you reach the end goal. I’m pretty sure it’s because of the way I arranged my code, but I’m not sure where I went wrong. Could someone point out my mistake and please fix this issue?
Link To Editor: https://playcanvas.com/editor/scene/892021