I’m trying to attempt to create an ability that has multiple charges. In this case I made a dash ability that has three charges using this method below.
UIS.InputBegan:Connect(function(input,gameProcessedEvent)
if gameProcessedEvent or SkillCooldown or ShiftCharge <= 0 then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
ShiftCharge -= 1
task.delay(SkillCooldownTime,function()
if ShiftCharge > ShiftCharge then print("max?") return end
ShiftCharge += 1
end)
SkillCooldown = true
YellowTriaRemote:FireServer("Shift")
task.wait(SkillCooldownSpamTime)
SkillCooldown = false
end
end)
My problem is how to go about displaying the cooldown UI. I want it to display the charge with the shortest cooldown time but my brain is having a hard time visualizing what that would look like through code. Usually i would just tween a frame starting from when i turned the debounce on but that wont work here.

When the big bar is blue that means the skill can be used. All the tiny little squares at the top would represent the charges and when a charge is used it turns white.
Any ideas help thank you!