I try use this documentation - AnimationTrack | Documentation - Roblox Creator Hub
But i can’t understand this…
Someone can help?
here my code:
local rp = game:GetService("ReplicatedStorage")
local event = rp.RemoteEvents:WaitForChild("PunchRemote")
local Animations = rp:WaitForChild("animation")
local MAXCOMBO = 3
local COMBO = 0
local PunchAnims = Animations:WaitForChild("CombatONE")
local punch1 = PunchAnims:WaitForChild("Hit1")
local punch2 = PunchAnims:WaitForChild("Hit2")
local punch3 = PunchAnims:WaitForChild("Hit3")
event.OnServerEvent:Connect(function(player)
local char = player.Character
local hum = char:WaitForChild("Humanoid")
local humRp = char:WaitForChild("HumanoidRootPart")
local p1 = hum:LoadAnimation(punch1)
local p2 = hum:LoadAnimation(punch2)
local p3 = hum:LoadAnimation(punch3)
if COMBO >= MAXCOMBO then
task.wait(1)
COMBO = 0
else
COMBO = COMBO+1
if COMBO == 1 then
p1:Play()
elseif COMBO == 2 then
p2:Play()
elseif COMBO == 3 then
p3:Play()
else return
end
end
end)