local function reset_combo()
print('here')
local count = 0
while tool.Deactivated do
if count == 5 then
if tool.Activated then
count = 0
else
print('finally')
tool:SetAttribute('Current_Combo', 0)
count = 0
end
else
task.wait(2)
count +=1
print(count)
end
end
count = 0
end
reset_combo()
Once the weapon is deactivated, I wanted to run a while loop that counts to 5 only when the weapon is not in use, I should probably connect this to a deactivation event