In some games you will notice that when you walk and you are at the edge of a map it is like there is an invisible box holding you back from going on how do you make something like that?
That’s quite simple
You can do two things, either use a very thin cube around the area. Set the physics bounds, and set it to invisible (in physics)
Use a point in polygon script, and stop player movement / set the player position to the edge of the map.
They’re called invisible walls for a reason. Do as agoose77 mentions and create a wall of sorts around your map, then set it to be invisible in the physics options. You can also make an invisible material for it so you can hide it in the viewport as well, but this isn’t necessary.