So Basically , On my cookie clicker like game, I can buy an upgrade which automatically gives you cookies, but I want the cookies to go up appropriate to the amount of cookies/second . So when I buy it , I get 1 cookie a second , but I don't want this :
while wait(1) do
integer.Value = integer.Value + auto.Value -- auto.Value being the amount per second.
end
so for example , if I have 2 cookies per second, it adds 1 every 0.5 seconds, and if I have 4 cookies/second, then it adds 1 every 0.25 a second.
My Problem ( and what I have got so far)
tim = auto.Value/1
while wait(tim) do
integer.Value = integer.Value + 1
end
the problem is that 'tim' is not updating, so when I get the upgrade, it adds 20 individually , and not 1
If you understood my explanation then well done :)) And thanks

1 comment
Wow thanks, You cant learn this stuff from the wiki :)