The problem could be in the frameEvent function in floor.lua. Maybe your math is wrong?
That doesn’t really help. I know about scene:destroy() as it’s in the code I posted and part of the framework, I just don’t know what needs to go in there. Also as I posted, the code works perfectly fine before the scene is reloaded, hence the math must be fine
Problem is solved! I completely removed all aspects of Tiled and wrote and managed my own .json files to remove all of the excessive global variables that Tiled required, added an extra conditional check to confirm that the player isn’t nil, and it seems to be working smoothly