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

What's wrong with my Animation script? (localscript)

Asked by
KenzaXI 166
8 years ago

As mentioned on my title, I've read through all the pages in wiki on Animations so I believe there should be no errors but yet it doesn't work, I even watched about 5 video tutorials from highly recommended Roblox channels and yet I still can't identify any errors especially since there's nothing in the output. Here's the script:

repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()  
Mouse.KeyDown:connect(function(Key)
    if Key == "q" then
        local Animation = Instance.new("Animation")
        Animation.AnimationId = "http://www.roblox.com/Asset?ID=281476213"
        local animTrack = Player.Character.Humanoid:LoadAnimation(Animation)
        animTrack:Play()
    end
end)

Thanks for the Help!

Answer this question