SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function waitForChild(parent, childName) |
| 1 | + | function onPlayerRespawned(newPlayer) |
| 2 | - | local child = parent:findFirstChild(childName) |
| 2 | + | |
| 3 | - | if child then return child end |
| 3 | + | if newPlayer.Character:findFirstChild("Animate")~=nil then break end
|
| 4 | wait() | |
| 5 | - | child = parent.ChildAdded:wait() |
| 5 | + | |
| 6 | - | if child.Name==childName then return child end |
| 6 | + | newPlayer.Character.Animate.Disabled = true |
| 7 | local c = script.Anima:Clone() | |
| 8 | c.Parent = newPlayer.Character | |
| 9 | c.Disabled = false | |
| 10 | - | local Figure = script.Parent |
| 10 | + | |
| 11 | - | local Torso = waitForChild(Figure, "Torso") |
| 11 | + | |
| 12 | - | local RightShoulder = waitForChild(Torso, "Right Shoulder") |
| 12 | + | function onPlayerEntered(newPlayer) |
| 13 | - | local LeftShoulder = waitForChild(Torso, "Left Shoulder") |
| 13 | + | newPlayer.Changed:connect(function (property) |
| 14 | - | local RightHip = waitForChild(Torso, "Right Hip") |
| 14 | + | if (property == "Character") then |
| 15 | - | local LeftHip = waitForChild(Torso, "Left Hip") |
| 15 | + | onPlayerRespawned(newPlayer) |
| 16 | - | local Neck = waitForChild(Torso, "Neck") |
| 16 | + | |
| 17 | - | local Humanoid = waitForChild(Figure, "Humanoid") |
| 17 | + | end) |
| 18 | - | local pose = "Standing" |
| 18 | + | |
| 19 | ||
| 20 | - | local currentAnim = "" |
| 20 | + | game.Players.PlayerAdded:connect(onPlayerEntered) --TalentGoesBy made this script. |