Basically there is a good way to detect if someone is in a certain place by using a part to span the place and detecting if the player is within boundaries of the part, but I don’t know how to check if a player is within boundaries of a part so I asked and i got given this information and don’t know what it means, can someone explain it to me? “For each coordinate (except y), check if the player position in that coordinate is bigger than the inferior limit of the part and smaller than the upper limit of that part”
There are a couple ways to do this:
-
Use Region3 Region3 | Documentation - Roblox Creator Hub, you can create a region between 2 points and get all the parts within the region and see if any of the parts belong to a character.
-
Use an invisible part that spans the region and use Part:GetTouchingParts() BasePart | Documentation - Roblox Creator Hub to again get all the parts in the region and see if any of the parts belong to a character.
-
Loop through all the players character’s and see if their position is between the 2 points. ex. if the left x position is -10 and the right x position is 10, then as long as the character’s x position is between -10 and 10, (repeat for both y and z if needed) then they are in the area.
Is the leftx and rightx noted separately in properties?