Trying to work with the Tick() function but not working?
tick = 0 while game.Workspace.Brick.Parent == Workspace do wait(1) tick = tick + tick() print(tick) end
You are overriding the function tick in your first line!
Use a different name for the current time!
You can see a similar thing here:
print(wait); -- It's initial value: -- function: 0x231b970 -- something! wait = 1; print(wait); -- Value now: -- 1 -- The function was lost!
tick
, like any other name, is just a variable, so your assignments to tick
are overwriting its useful initial value.
Also, tick()
returns current time since a certain point. It is essentially never meaningful to increment a value by the current time as you are attempting in the snippet you posted.