User:Anaminus/Script:Inanimate
From Legacy Roblox Wiki
Jump to navigationJump to search
--Anaminus print("Inanimator Loaded") function onPlayerRespawned(newPlayer) local joints = newPlayer.Character.Torso:GetChildren() local animate = newPlayer.Character:FindFirstChild("Animate") if animate ~= nil then animate.Parent = nil for i = 1, #joints do if joints[i].className == "Motor" then joints[i].DesiredAngle = 0 joints[i].CurrentAngle = 0 joints[i].MaxVelocity = 0 end end end end function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end game.Players.PlayerAdded:connect(onPlayerEntered)