I have another question, what can i also need to do to make my animation play one by one. like right punch press f next left punch press f again and kick press f again and again and again ?
local plr = game.Players.LocalPlayer local UIS = game:GetService("UserInputService") UIS.InputBegan:connect(function(key, GPE) if key.KeyCode == Enum.KeyCode.F and not GPE then local anim1 = plr.Character.Humanoid:LoadAnimation(script.Animation1) local anim2 = plr.Character.Humanoid:LoadAnimation(script.Animation2) local anim3 = plr.Character.Humanoid:LoadAnimation(script.Animation3) anim1:Play() wait(0.5) anim1:Stop() anim2:Play() wait(0.5) anim2:Stop() anim3:Play() wait(0.5) anim3:Stop() end end)
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait() -- Gets the local player obj or waits until it adds local char = plr.Character or player.CharacterAdded:Wait() -- Gets the character obj or waits until it adds local hum = char:FindFirstChild("Humanoid") local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(key, GPE) -- Why connect?? Use Connect! if key.KeyCode == Enum.KeyCode.F and not GPE then local anim1 = hum:LoadAnimation(script.Animation1) local anim2 = hum:LoadAnimation(script.Animation2) local anim3 = hum:LoadAnimation(script.Animation3) anim1:Play() wait(0.5) anim1:Stop() If key.KeyCode == Enum.KeyCode.F and not GPE then anim2:Play() wait(0.5) anim2:Stop() end If key.KeyCode == Enum.KeyCode.F and not GPE then anim3:Play() wait(0.5) anim3:Stop() end end end)
If this answer helped, if not, ask as many questions if you want(I was in a rush)