A tick() question

tick(). I’m currently making a gametimeban command , which bans you from the game (not just server) with the given time, so this is an important question,

Does tick() only measure the time of the server or the whole game?

Also, I refuse to use os.time() because it’s bypassable by changing your current time.

And if tick only measures the server time, what should I use instead?(don’t say os.time as it’s bypassable)

i am pretty sure it does for server and not the whole game ya know

So what should I use instead??

hmmm i say data store is the best option here

you see data store is for the entire game each and every server

No, I get that, but if tick only measures server time it wouldn’t be accurate, I meant is there a relative to tick but measures gametime

Watch this video for help!

tick() measures the time that passed from January 1, 1970, to when it is called, it would be better to use os.time if they are large numbers, such as days, if it is the time within that server, from the beginning, you must make your own counter.

1 Like

that gives me a idea that u can use both! you can save the tick() and load it in another server VIA datastore

Uhh no it wouldn’t bc is.time is bypassable by changing your current time.

No, that would happen if it is called from the client, from the server that does not happen and if it happens it is an error.

But what if the game goes offline, how would the script measure the seconds? Do I just use httpservice?

So how would I prevent that error?

that dosent matter to datastore! datastore saves on cloud or memory idk exactly but it would work no problemo :slight_smile:

But tick only measures the server time, so he would wait extra if he wants to join another server

oh yea didnt thought of that lol

Use it when the player joins if he is related to them, on very rare occasions it can fail, but it is just a bug.

game:GetService("Players").PlayerAdded:Connect(function(Player)
	print(Player, tick())
end)

i guess use what @SOTR654 said here

aka os.time and datastore

I’ll just try to use os.time in server I guess, if it works I’ll mark @SOTR654 post as solution if it works

ok ask me for help if you want

1 Like

why would you even use os.time() on the client