Let's say
local TD = 0
when the player pressed the button, 1 is added to TD and now
local TD = 1
if you press the button a second time, then 1 more will be added and then
local TD = 2
it seems easy, but I don’t know how to make a counter
Let's say
local TD = 0
when the player pressed the button, 1 is added to TD and now
local TD = 1
if you press the button a second time, then 1 more will be added and then
local TD = 2
it seems easy, but I don’t know how to make a counter
Well, this is essantailly just logic, you can think about it, have an event to detect if we pressed, than add 1 to that variable, like this TD = TD + 1, realy what we are saying here is, set TD to whatever TD and add 1 to it.
So yeah it is easy to understand this mechanism
local TD = 0
clickDetector.MouseClick:Connect(function()
TD = TD + 1
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
I was about to answer, but you already gave the answer hehe.
Sorry :)
Thanks