How to prevent glitching out of map

My game has recently got issues with lots of people glitching out of the map.
This is pretty annoying since it’s a survival game and glitching out of the map can allow people to infinitely survive rounds.

I have invisible walls in my game and also invisible kill walls in my game, but people still somehow glitch trough them even though the invisible walls stretch out over a large space. Is there any way i can prevent people from glitching out of the map permanently?

There are also exploits made that allow players to teleport their what i assume HumanoidRootPart very far out of the map using coordinates.

Is there any way i could create a system that doesn’t allow people to go beyond a specific set of coordinates which npc are still able to go beyond?

You could look in this topic. Its a zone module where you can check whenever a player enters or leaves a zone so you could make a zone in your playing area and detect when people are leaving that area.

At the end of each round before you award points and stuff, loop through the survivors and check if they are within bounds with a simple if statement. If they are outside of bounds, simply exclude them from the survivor list.
Something like this should work:

--server script
local Bounds = { --list of minimum and maximum coordinates
   X = {
      Min = -100,
      Max = 100
   }, 
   Y = {
      Min = -100,
      Max = 100
   }, 
   Z = {
      Min = -100,
      Max = 100
   }
} --define this outside of end of round code to avoid repeatedly redefining, also adjust the bounds accordingly so that they fit your needs

--end of round code
for i, survivor in pairs(survivors) do --assuming survivors is a list of player objects
   local Position = survivor and survivor.Parent and survivor.Character and survivor.Character.Parent and survivor.Character:FindFirstChild("Humanoid") and survivor.Character.Humanoid.Health > 0 and survivor.Character:FindFirstChild("HumanoidRootPart") and survivor.Character.HumanoidRootPart.Position or false
   if not (Position and Position.X >= Bounds.X.Min and Position.X <= Bounds.X.Max and Position.Y >= Bounds.Y.Min and Position.Y <= Bounds.Y.Max and Position.Z >= Bounds.Z.Min and Position.Z <= Bounds.Z.Max) then
      survivors[i] = nil
   end
end
--survivor point award & text code w/ whatever other stuff below

Then people would just glitch back into bounds right before the round starts. I say check this script consistently.

PS WAIT WHY DID YOU NECRO POST