Animation Freezing

I’ve been working on this animation, it plays and everything but when it plays, it freezes halfway through the animation instead of at the very end.

–Here’s The Script

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild(“Humanoid”)

local animator = hum:WaitForChild(“Animator”)
local animation = script.Parent.Animation

function Equipped()
local animateTrack = animator:LoadAnimation(animation)

animateTrack:Play()
task.wait(animateTrack.Length * 0.98)
animateTrack:AdjustSpeed(0)

end

script.Parent.Equipped:Connect(Equipped)

–Its a Local Script

Don’t you have to call load animation earlier to give roblox time to load it? You could also use animation events for this instead.

You’re right, I probably shoulda just left that out of the function.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.