#m1 animation

1 messages · Page 1 of 1 (latest)

hollow shore
#

ive been trying to fix this for so long and i don't know why it isn't literally any reason you can think of tell me
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PLayers = game:GetService("Players")

local Events = ReplicatedStorage.Events

local AttackHitboxes = require(script.Parent.AttackHitboxes)

local ClickAttackDebounces = {}

Events.ClickAttack.OnServerEvent:Connect(function(Player)
local Character = Player.Character
if Character == nil then
return
end
local Humanoid = Character:FindFirstChild("Humanoid")
if Humanoid == nil then
return
end
if Humanoid.Health <= 0 then
return
end
if ClickAttackDebounces[Player] then

end

ClickAttackDebounces[Player] = true
local PunchCombo = Player.Values.PunchCombo
local Animation = script.PunchAnimationCycle[tostring(PunchCombo.Value)]
local LoadedPunchAnimation = Humanoid.Animator:LoadAnimation()
print(Humanoid.Animator:LoadAnimation())
print(LoadedPunchAnimation:play())
if PunchCombo.Value <= #script.PunchAnimationCycle:GetChildren() then
    PunchCombo = 1 
else
    PunchCombo.Value += 1 
    
end

task.wait(LoadedPunchAnimation.Length + 0.1)

if ClickAttackDebounces[Player] then
    ClickAttackDebounces[Player] = nil
    
end

end)

earnest cobalt