#particle emits even inside of cooldown

1 messages · Page 1 of 1 (latest)

vivid fable
#

local animator = script.Parent:WaitForChild("Humanoid"):WaitForChild("Animator")

local attackanim = script:WaitForChild("attackanim")
local attackanimTrack = animator:LoadAnimation(attackanim)

local range = script.Parent:WaitForChild("range")
local vfx = script.Parent:WaitForChild("vfx"):WaitForChild("vfxparry")

local playerhitted = {}

range.Touched:Connect(function(somethingtouchedrange)
if somethingtouchedrange.Parent:FindFirstChild("Humanoid") then

    if somethingtouchedrange.Parent:FindFirstChild("Humanoid").Health > 0 and not table.find(playerhitted, somethingtouchedrange.Parent) then
        table.insert(playerhitted, somethingtouchedrange.Parent)
        attackanimTrack:Play()
        attackanimTrack.Priority = Enum.AnimationPriority.Movement
        for time = 1, 10 do
            print("zom cd:", time)
            task.wait(1)
            if time == 10 then
                table.clear(playerhitted, somethingtouchedrange.Parent)
            end
        end
        
    end
end

end)

attackanimTrack:GetMarkerReachedSignal("vfxparrystart"):Connect(function(vfxparryhasstarted)
if vfxparryhasstarted then
print("vfxparry started")
vfx:Emit(1)
end
end)

#

the animation marker or the animation event wtv it is is at the start of the animation

#

i think something is wrong with the getmarkerreachedsignal line and below but i dont know what it is