I was trying to make limits for the player in godot4 so the player won’t be able to get out of the map
The map is 3D by the way.
I hope you can help.

Use static body 3d

Use invisible collision shapes around the perimeter of the map, or construct the map with “natural” looking obstacles the player can’t overcome.