How to make temporary ban?

There is a tremendous difference between using tick() on the server vs the client. Client is local, server is not. That’s not hard to understand and has been my point all along.

Tick returns local time. If you read the Luau recap, it returns “a variant of the UNIX timestamp in local time”, or in this case the server’s timezone. And if you still think that’s not a valid reason, it’s also going to be deprecated sometime in the future. Luau Recap: June 2020

1 Like

Building off from the article you linked, it states this

tick() sounds perfect - it has a high resolution (usually around 1 microsecond), and a well-defined baseline - it counts since UNIX epoch! Or, well, it actually doesn’t. On Windows, it returns you a variant of the UNIX timestamp in local time zone. In addition, it can be off by 1 second from the actual, real UNIX timestamp, and might have other idiosyncrasies on non-Windows platforms.

Even if what you might have said about running it on the server, this clearly shows it is not as reliable and one might seem.

1 Like

Oh yeah I just went to search more about tick() and os.time() differences and the only difference that I noticed was of it returning time and including miliseconds.

But I mean, os.time() would do the same thing in this case… I recommend it because of the fact you can use it to check days, months without needing to calculate how many seconds passes between each one which could make the temp ban system a quite more easier.

I am not wrong. The clients are connected to the same server.

Players can connect to a server with hours difference therefore tick() would return the amount of seconds from the UNIX epoch relative to the server time. So the ban would expire earlier or later.

You should be able to accept that you aren’t correct here

Please follow the guidelines before posting: About the Scripting Support category