I have a running system, so you hold shift and your speed increases and a running animation plays, but sometimes after it stops playing the walking animation bugs like this:
Can we see your code? And what’s the priority for the running animation?
The priority for it is Action, and this is the running code
elseif Action == 'Run' and InputState == 'Hold' and CanAttack.Value == true then
CanAttack.Value = false
local Value = Instance.new('BoolValue')
Value.Name = 'Run'
Value.Parent = Character
Animations:Play(Humanoid, 'Run')
elseif Action == 'Run' and InputState == 'Release' then
Character.Run:Destroy()
Animations:Stop(Humanoid, 'Run')
CanAttack.Value = true
end
Any errors in the output? I can see one spot that could possibly be the issue.
Character.Run:Destroy()
Animations:Stop(Humanoid, 'Run')
I’m not an expert with animations, but I don’t believe you can stop an animation after destroying it. Maybe try stopping it before you destroy it?
I’m not destroying the animation im destroying a value inside the character
You should probably add comments to your code, or use better variable names. It makes it harder for us (DevForum Community) to help you solve your issues. In order to help we need to understand how your code works, so adding comments or explaining what it does sequentially will help us exponentially.
That’s true, but an Animation Track doesn’t get parented to the Character Model by default.
Anyway, I found the solution to my problem, I just edited the Default Animate script and made it always adjust the weight and speed to 1:
currentAnimTrack:AdjustWeight(1)
runAnimTrack:AdjustWeight(1)
currentAnimTrack:AdjustSpeed(1)
runAnimTrack:AdjustSpeed(1)