how you can make that the player cannot ran out of the map
Detect whether the player's position is within the map boundaries!!
https://microstudio.io/i/Loginus/mapcollision/