#Please help me

27 messages · Page 1 of 1 (latest)

terse radish
#

I wanna run a code that is being ran for a limited time and I don’t know what to write someone help it’s really important for me

flint panther
#

Explain further?

terse radish
flint panther
#

Oh ok

#

Just get the local time, convert it to the limited time and fire your event

coral gyro
median sluice
#

Use tick() to get the current time in ticks (basically seconds) and convert 30 days (or any amount you want) in seconds then add the number you got to the current tick and save it in player data and to see if 30 days has past, just compare the new current tick to the old tick you have saved

blissful crag
# terse radish Wdym local time

if you dont know what tick() is, its basically the time since 1st of january of 1970, so all you gotta do is to add the number to the current tick time+

#

you can also use tick to measure the time a script took to run

#

for example

#
local TIME = tick()

wait(3)

print(tick()-TIME)```
#

it would print 3 in this case

#

its important for you to understand what you are doing instead of just taking the code from help 🤷‍♂️ if you want further information on tick() just read about it on the roblox documentation page

#

it is better to use os.time() to, tick() isnt really deprecated but i heard that os.time() does the same thing but better

glossy hornetBOT
#

studio** You are now Level 2! **studio

blissful crag
#

doesnt really make a diffrence tho

median sluice
#

What?

#

You mean local script or a variable?

coral gyro
# median sluice What?

tick() depends on the local timezone of each machine. That's why there is a big difference

#

Google:

median sluice
#

Ahh... then it should use os.time

coral gyro
#

Your system would need a universal time zone to accurately get a time ban

median sluice
#

You were right

coral gyro