No animations working with my script

i’ve tried using even default animations, it says they’re playing but my character doesn’t actually move, also the KeyframeReached function isn’t outputting anything

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild(“Humanoid”)
local uis = game:GetService(“UserInputService”)

local animator = humanoid:FindFirstChildOfClass(“Animator”)
if not animator then
animator = Instance.new(“Animator”)
animator.Parent = humanoid
end

local anim = Instance.new(“Animation”)
anim.Name = ‘clapAnim’
anim.AnimationId = “rbxassetid://79520310159715”

local track = animator:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
track:Play()

print(“Track length:”, track.Length)
print(“IsPlaying:”, track.IsPlaying)

animator.AnimationPlayed:Connect(function()
print(animator:GetPlayingAnimationTracks())
end)

uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
track:Play()
end
end)

track.Stopped:Connect(function()
print(“Animation stopped”)
end)

track.KeyframeReached:Connect(function(key)
print(“Keyframe reached:”, key)
end)

Hello this should be moved to Help and Feedback > Scripting Support

If this animation isn’t yours, you might wanna use the Animation Spoofer plugin. However, if it is, maybe unanchor the rig or change the animation priority.

1 Like