So, I'm trying to make this script play multiple animations. The output says nothing is wrong, but it won't work. For reference, the game is in FE.
local debounce = false
local leftp = false
local Character = game.Players.LocalPlayer.Character
function onKeyPress(inputObject, gameProcessedEvent)
if not debounce then
if inputObject.KeyCode == Enum.KeyCode.Q then
debounce = true
leftp = not(leftp)
end
end
end
if leftp then
local animation = script.LPunch
local anim = Character.Humanoid:LoadAnimation(animation)
anim:Play()
debounce = true
wait(0.3)
debounce = false
else
local animation2 = script.RPunch
local anim2 = Character.Humanoid:LoadAnimation(animation2)
anim2:Play()
debounce = true
wait(0.3)
debounce = false
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)

1 comment
What does it do?