Problem with parts that you stand on and get cash slowly

So what I am doing is trying to get cash slowly but instead it went very quickly and I need some help figuring out how to slow it down. Here is my script:
image
I call Cash “Tokell” since I dont want to call some basic currency names.
Thanks for trying to help if you did

All you need to do is add a cooldown. Simply make a variable at the top of your script.

local cooldown = false

And then, in the if statement, put this:

cooldown = true
wait(0) -- put your wait time here
cooldown = false
1 Like

what kind of if statement are you trying to talk about

1 Like

do local player = game.Players:GetPlayerFromCharacter(partB.Parent)

Sorry, the if Players then if statement.

Your code did not work since it kept going. Its probably because everytime i step on it I gain cash

Ok what else should I do since I put it in and nothing is happening

local db = false
if humanoid and not db then
db = true
—script here
task.wait(number)
db = false
end

Have you changed the wait time from 0 to whatever CD you want? The code should work if you do what @BitMaster32 has said with an if statement.

(what @ro1bro1x ha sent should work as the CD system)

1 Like

Yes I have and it did not work

Your code successfully worked and I thank you for it.

Ah i’m sorry, I forgot to edit the conditions of the if statement. :man_facepalming:

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