local module = {}
local RPunchAnim = Instance.new("Animation")
local LPunchAnim = Instance.new("Animation")
local KickAnim = Instance.new("Animation")
local UppercutAnim = Instance.new("Animation")
RPunchAnim.AnimationId = "18426281478"
LPunchAnim.AnimationId = "18434268855"
KickAnim.AnimationId = "18434272823"
UppercutAnim.AnimationId = "18434276521"
local debounce = false
local isHit = false
local hitCount = 0
local timer = tick()
module.activateM1 = function(player)
local Humanoid = player.Character.Humanoid
local HRP = player.Character.HumanoidRootPart
if not debounce then
local AnimPlay
debounce = true
if tick() - timer > 2 then
hitCount = 0
end
timer = tick()
hitCount += 1
if hitCount == 1 then
AnimPlay = Humanoid:LoadAnimation(RPunchAnim)
elseif hitCount == 2 then
AnimPlay = Humanoid:LoadAnimation(LPunchAnim)
elseif hitCount == 3 then
AnimPlay = Humanoid:LoadAnimation(RPunchAnim)
elseif hitCount == 4 then
AnimPlay = Humanoid:LoadAnimation(KickAnim)
end
end
AnimPlay:Play()
print(hitCount)
wait(0.5)
debounce = false
end
return module
enter image description here
-Get rid of the error
Note: My friends and I collaborated together and we are not in any same roblox group, I didnt animtate the animation and the animationIDs is correct (the animator which is the owner of the game typed them himself twice).
thanks for reading
New contributor
Tung Duong Nguyen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.