How do you check if the player is in certain area

Ive messed around with your Script, it is indeed very accurate, But, i have found a issue with it, it seems, that in some cases it isnt capable of detecting when a player leaves a area, in my case, i have linked it to a system that plays music and shows a gui on screen when a player enters a area, but sometimes, it just does not detect when the player leaves and the music keeps going forever

Any idea of how i could fix this issue, it is a problem, since my game is suposed to run with 50 player servers and only having two players breaks it

1 Like

I have checked how I did it… I used GPS :slight_smile:

local The_Player_3D
The_Player_3D = The_Player.Character
local Player_Pos_V3 = The_Player_3D.HumanoidRootPart.Position

if Player_Pos_V3.X > 276 then
   if Player_Pos_V3.X < 290.5 then
      if Player_Pos_V3.Y < -358 then
         if Player_Pos_V3.Y > -381.5 then
            if Player_Pos_V3.Z > -1050.5 then
               if Player_Pos_V3.Z < -1012 then
                   -- the player is in the designated area
               end
            end
         end
      end
   end
end
2 Likes