Is there anyway rather than having a loop that detects if a player's torso is Magnitude x of a block, all I know is how to do the loop:

while true do
	for i, v in pairs (game.Players:GetChildren()) do
		if (v.Character.Torso.Position - script.Parent.Position).magnitude <= 10 then
	end
end
wait()
end

1 comment