I want to be able to detect the amount of players touching a block, The reason I want to do this is because I'm currently making a minigame style game, and certain ones of these minigames are over when there is one player remaining. I was thinking of making a view box for everyone dead, and making it so that when there is 1 less player than all players in the server the game would end and then I could add points to that person's character (I have that covered though). I could detect the amount of player - 1 by (I think) doing this:
local PlayerCount = game.Players:GetPlayers() local neededDeadPlayers = PlayerCount - 1 if PlayerCount = PlayerCount - neededDeadPlayers then --Make players CFrame = to spawn end
But ofcourse, I just need help with the detecting if the player is touching or within a certain unit radius of an object. I appreciate anyone and everyone that decides to help