![]() ![]() This might not be what you normally want, but it can be used to find what timezone the player is in, or to see what the player's current time is. To be noted is that if you call the tick() function from a LocalScript, you will get the player's time, and not the server's. Then you can use it in any script like this: local getTime = require() Return function() return (CurrentTime / 1000) - ServerTime + tick() end It’s also, at times, wonderfully indifferent to me. Local CurrentTime = tonumber(Game:GetService("HttpService"):GetAsync(TimeServer, true)) In a million little ways, Tears of the Kingdom ’s world is alive and responsive to my presence. Return CurrentTime - (ServerTime * 1000) + tick()īut to make it more efficient, place this in a ModuleScript in Game.ServerScriptService called "Time" : local TimeServer = "" You do not want to use HttpService each time you want the time, so you want to use something like this: function getTime() This will make the "CurrentTime" variable contain the current microseconds since Unix Epoch. Cooldown E - 1 minute and 20 seconds Q - 30 seconds Cost 15000 punches Contents 1 Overview 2 Moves 2.1 E - Time Freeze 2.2 Q - Time Reverse 3 Trivia 4 Rating 5 Gallery Overview Time is the 34th ability in Ability Wars, and costs 15000 Punches. Local CurrentTime = Game:GetService("HttpService"):GetAsync(TimeServer, true) ![]() Here is an example on how you can get the current time: local TimeServer = "" If you have your own server, you can use that to get the current time, and if not you can look for a server that can give you the current time. To get data from an external server you need to use the HttpService. How do I get a time value that's consistent across all servers and places in my game? (The actual time in real life would work well for this purpose.)īecause the ROBLOX servers can use different timezones, you would simply want to use a server where you know what timezone it uses. Due this fact, it cannot say anything about relative times between two servers (such as measuring how long it has taken since the last visit of the player). ![]() If your browser is buffering the video slowly, please play the REGULAR MP4 VERSION or Open The Video. This time will differ in several hours, as much as the time zone difference is. (Note: The default playback of the video is HD VERSION. Returns the time in UNIX time, which is the number of seconds since the Unix epoch, January 1st, 1970.īecause some servers run in different timezones (such as servers in America and Europe), tick() will return a different time on those servers. I already know about the Time function, but the documentation for that function seems to indicate that it is only consistent across a single place (or perhaps only a single place instance?): Returns returns the current place time in seconds. In my Roblox place, I want to get a value representing the current time which is consistent across all running servers and places in my game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |