I want this script to remove its parent when a player is not near it, but it will not work why?
while true do
for i,v in pairs(game.Players:GetChildren()) do
if (v.Character.UpperTorso.Position - script.Parent.Position).magnitude >= 10 then
script.Parent:remove()
print("Perfect")
end
end
wait()
end
