This script isn't working, could someone please tell me what I'm doing wrong?
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char.HumanoidRootPart:GetPropertyChangedSignal("Position"):Connect(function()
if (script.Parent.Position - char.HumanoidRootPart.Position).magnitude < 5 then
script.Parent:Destroy()
end
end)
end)
end)
Thanks!
