Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Idle Animation won't Update until Player Moves?

Asked by 3 years ago

I'm working on importing some custom animations and I'm a bit puzzled as to why, when I update the idle animation at the press of a key, I need to move first in order for the new idle animation to actually show. Is this a problem of animation priority or a scripting problem?

if crouched == true then
        workspace[plr.Name].Humanoid.WalkSpeed = 0
        crouchload:Play()
        wait(0.5)
        workspace[plr.Name].Humanoid.WalkSpeed = 4

        workspace[plr.Name].Animate.walk.walk.AnimationId = "http://www.roblox.com/asset/?id=7090658678"
        workspace[plr.Name].Animate.run.run.AnimationId = "http://www.roblox.com/asset/?id=7090658678"
        workspace[plr.Name].Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=7090666856"
        workspace[plr.Name].Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=7090666856"
    else
        workspace[plr.Name].Humanoid.WalkSpeed = 0
        uncrouchload:Play()
        wait(0.5)
        workspace[plr.Name].Humanoid.WalkSpeed = 8

        workspace[plr.Name].Animate.jump.jump.AnimationId = "http://www.roblox.com/asset/?id=7086152768"
        workspace[plr.Name].Animate.walk.walk.AnimationId = "http://www.roblox.com/asset/?id=7086013218"
        workspace[plr.Name].Animate.run.run.AnimationId = "http://www.roblox.com/asset/?id=7086842419"
        workspace[plr.Name].Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=5319828216"
        workspace[plr.Name].Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=5319831086"
    end

Answer this question