You are trying to change an IntValue's value through a LocalScript, I would suggest doing this;
local ki = 100
local maxKi = 100
while script.Parent.Activated == true do
ki = ki - 1
if ki <= 0 then break end
wait(1)
end
First, we are going to define ki as 100 and maxKi as 100. Ki will be your default/regular amount of ki your player will have. The maxKi just means the maximum amount of ki a player will have. Although they are just defined as int value meaning they are numbers until you used them correctly, like show above. Next while the player is clicking down with a tool, the ki will decrease by 1 every second (which you know already). If ki is less than or equal to 0 then it will stop the while loop and skip the while function.
1 comment
it didnt work, but thx