Advertisement
Paulo87

zumbi animation

Jul 21st, 2024
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local player = Players.LocalPlayer
  4.  
  5. local function applyAnimations(character)
  6.     if character:IsA("Model") and character:FindFirstChild("Humanoid") and character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  7.         local Animate = character:WaitForChild("Animate")
  8.         Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616168032"
  9.         Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616163682"
  10.         Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616161997"
  11.         Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616156119"
  12.         Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616157476"
  13.         Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616158929"
  14.         Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616160636"
  15.     end
  16. end
  17.  
  18. local function onCharacterAdded(character)
  19.     applyAnimations(character)
  20.     local heartbeatConnection
  21.     heartbeatConnection = RunService.Heartbeat:Connect(function()
  22.         if not character or not character.Parent then
  23.             heartbeatConnection:Disconnect()
  24.         else
  25.             applyAnimations(character)
  26.         end
  27.     end)
  28. end
  29.  
  30. player.CharacterAdded:Connect(onCharacterAdded)
  31.  
  32. if player.Character and player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  33.     applyAnimations(player.Character)
  34. end
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement