The title says it all. I just like being evil to other players in scripting servers (lol). I ran this script in studio and it works when I spawn in for the first time. However, when I reset and respawn, it doesn't redo the script. What can I do to make it repeat after someone has reset their character?
wait(3)
local usr = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait() --my attempt at making the script continue running despite someone resetting their character
usr.PrimaryPart = usr.Head
usrDesc = usr:GetChildren()
for _, usrDes in pairs(usrDesc) do
if usrDes:IsA("Part") or usrDes:IsA("MeshPart") then
usrDes.Anchored = true
usrDes.Transparency = 1
elseif usrDes:IsA("Accessory") then
usrDes:Destroy()
end
if usrDes:IsA("Part") and usrDes.Name == "Head" then
usrDes.face:Destroy()
end
end
wait()
usr:SetPrimaryPartCFrame(CFrame.new(0, 20, 0))

1 comment
:wait() is deprecated use:Wait()