Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local function applyAnimations(character)
- if character:IsA("Model") and character:FindFirstChild("Humanoid") and character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- local Animate = character:WaitForChild("Animate")
- Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616163682"
- Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616156119"
- Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- end
- end
- local function onCharacterAdded(character)
- applyAnimations(character)
- local heartbeatConnection
- heartbeatConnection = RunService.Heartbeat:Connect(function()
- if not character or not character.Parent then
- heartbeatConnection:Disconnect()
- else
- applyAnimations(character)
- end
- end)
- end
- player.CharacterAdded:Connect(onCharacterAdded)
- if player.Character and player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- applyAnimations(player.Character)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement