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

Help with keypress events please? [UNANSWERED]

Asked by
Irvene 5
9 years ago

So I'm as you can see a rookie at KeyDown events, I'd like some help with playing animations could someone give me some help on how to play an animation on keypress?

Here's the script:

Player = game.Players.LocalPlayer

tool = script.Parent

tool.Equipped:Connect(function(mouse)

mouse.KeyDown:Connect(function(key)

       if key == "e" then

        local anim = instance.new("Animation")


       end
end)

3 Questions Where would the parent be of the animation so the script can play? How do you play the animation? How do you debounce it so it isn't spammable?

0
Instance.new() ** ConnorVIII 448 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

Hmmm.... Maybe Like This. (Use it in LocalScripts!) (Just Answer The Questions, Not The Script) Q1. The Parent A1. The Humanoid Q2. Play It? How? A2. The Lines Below.

local animthing = Humanoid:LoadAnimation(yourAnimation)
animthing:Play()

Q3. How To Debounce It? A3. wut iz debounce?

0
Why Did I Get A -1? TheThomasBuilder 0 — 9y
0
Because you have to be sure with your answer, you don't just give out guesses this is scripting helpers. Irvene 5 — 9y
0
Oh Thanks, From Now On I Will Answer Surely. TheThomasBuilder 0 — 9y
Ad

Answer this question