Advertisement
Guest User

Forsaken Noli animation script client sided

a guest
May 18th, 2025
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | Gaming | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3.  
  4. local player = Players.LocalPlayer
  5.  
  6. local function setupAnimations(character)
  7. local humanoid = character:WaitForChild("Humanoid")
  8.  
  9. -- Disable Animate if present
  10. local animate = character:FindFirstChild("Animate")
  11. if animate then
  12. animate.Disabled = true
  13. end
  14.  
  15. -- Load custom animations
  16. local idleAnim = Instance.new("Animation")
  17. idleAnim.AnimationId = "rbxassetid://83465205704188"
  18.  
  19. local moveAnim = Instance.new("Animation")
  20. moveAnim.AnimationId = "rbxassetid://103292185212679"
  21.  
  22. local idleTrack = humanoid:LoadAnimation(idleAnim)
  23. local moveTrack = humanoid:LoadAnimation(moveAnim)
  24.  
  25. idleTrack.Priority = Enum.AnimationPriority.Action -- Higher than Core
  26. moveTrack.Priority = Enum.AnimationPriority.Movement
  27.  
  28. idleTrack:Play()
  29.  
  30. RunService.Heartbeat:Connect(function()
  31. local speed = humanoid.MoveDirection.Magnitude
  32.  
  33. -- Force-stop other idle animations
  34. for _, track in pairs(humanoid:GetPlayingAnimationTracks()) do
  35. if track.Animation.AnimationId ~= idleAnim.AnimationId
  36. and track.Animation.AnimationId ~= moveAnim.AnimationId then
  37. if track.Priority == Enum.AnimationPriority.Core
  38. or track.Name == "idle"
  39. or track.Animation.AnimationId:lower():find("idle") then
  40. track:Stop()
  41. end
  42. end
  43. end
  44.  
  45. if speed > 0.01 then
  46. if not moveTrack.IsPlaying then
  47. idleTrack:Stop()
  48. moveTrack:Play()
  49. end
  50. else
  51. if not idleTrack.IsPlaying then
  52. moveTrack:Stop()
  53. idleTrack:Play()
  54. end
  55. end
  56. end)
  57. end
  58.  
  59. -- Support for current and future character loads
  60. if player.Character then
  61. setupAnimations(player.Character)
  62. end
  63.  
  64. player.CharacterAdded:Connect(setupAnimations)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
Tags: *script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement