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

What is the problem here??

Asked by 8 years ago

local player = game.Players.LocalPlayer local animation = script:WaitForChild("Animation") enabled = true function onKeyDown(key) if (key ~= nil) then key = key:lower() if enabled (key == "p") then

    enabled = false

local animationTrack = player.Character.Humanoid:LoadAnimation(animation) animationTrack:Play()

    wait(2)
    enabled =true

end end end

So yeah i got a problem i want to press a key p then the animation happends, but what am i doing wrong?

Answer this question