Help with cooldown system

Hi, so I am making a battleground game and need help with a cooldown system, what I want to achieve is that whenever the player does an m1 it starts the cooldown and when the current playing animation “end” marker is reached the cooldown ends.

Thanks.

1 Like

Alright I’ll take this.

So, let’s start by playing the animation.

local cooldown = false
local animtrack = humanoid.Animator:LoadAnimation(animationinstance)
animtrack:Play()
cooldown = true

animtrack:GetMarkerReachedSignal("eventname"):Connect(function()
    cooldown = false
end)
1 Like

I alrd tried doing something like this but for some reason it doesn’t work

did you add an animation event TO the animation itself?

yes i did, ineedtowritethisbcsofroblox

Make sure it’s the correct name.

ye I managed to make it work somehow LOL.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.