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

Script works but character's animation does not load?

Asked by 5 years ago

The script runs perfectly and does not show any errors but the animation does not run

local WASDDown = false
local input = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer

repeat wait()until plr.Character.Parent == workspace.FlightModel
repeat wait()until plr.Character.Parent == workspace

input.InputBegan:connect(function(k)
    local key = k.KeyCode
    if key == Enum.KeyCode.W  then
        WASDDown = true
        print("wasd up")
        plr.Character.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=2230124960"
    end
end)

input.InputEnded:connect(function(k)
    local key = k.KeyCode
    if key == Enum.KeyCode.W  then
        WASDDown = false
        print("wasd down")
        plr.Character.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=2269489808"
    end
end)

Answer this question