generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: tick() to CST time?

Previous Thread :: Next Thread 
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 09:38 PM
tick() is one of the functions I still have no idea how to work, any help?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Oct 2013 09:40 PM
tick just returns the amount of seconds since Jan. 1 19 something something.
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
11 Oct 2013 09:40 PM
tick() is almost never used to tell the time. Instead, people usually use it to tell very accurate time, or time over servers. For example:
- Banning a player for 10 minutes. You would save tick + something to their data persistence that says when they can play again, and use tick() to check its time to stop kicking them whenever they join.
- Checking how long a function takes: t = tick() print("Hi") t2 = tick() print("That took "..t2 - t.." seconds")

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 09:44 PM
Erm, whats a better way to tell time then?
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 09:45 PM
For ONE time zone, not the client time zone.

EST, PST, and CST would be good.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Oct 2013 09:46 PM
You just get the amount of hours it offsets by from PST.

so

tick() * hours * (60 * 60)

Or if you are in a local script, it will just get your computer's tick()
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
11 Oct 2013 09:46 PM
Um... well, tick(). And math. It's just not a very common use of it. You would have to use it from a server-side Script though, if you want to stick to one timezone.

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
11 Oct 2013 09:46 PM
@cntkillme
onoe you ninjad me
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Oct 2013 09:52 PM
revenge huehue cuz yolo
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 09:54 PM
What cnt? I didn't get that at all....
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Oct 2013 10:01 PM
tick() in a server-sided script gives you Roblox's timezone, which is PST.
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 10:07 PM
So what would the code be?
Report Abuse
fallout68 is not online. fallout68
Joined: 26 Sep 2009
Total Posts: 2249
11 Oct 2013 10:08 PM
I should mention that this goes into a GUI. As of now, it just goes tick() and seconds. But there are ALOT of seconds since whatever the date is.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
11 Oct 2013 10:12 PM
A LOT*

What is the problem...?
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
11 Oct 2013 10:57 PM
This is what Tick is used for(Or how I mostly use it :P)

a = tick()
--Code
b = tick()
print("It took:"..a-b)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image