Is there a way to prevent server hopping?

Hello everyone, so as the title suggests, are there some lines of code that I can use in order to prevent server hopping in the same experience? Thank you.

1 Like

Why do you need to do this? Perhaps there’s a better way to achieve what you need to do?

I just don’t want players from hopping servers, for example in games like Apocalypse Rising players can hop servers to constantly loot boxes in the same location. Stuff like that.

If you want to stop players from farming loot boxes then, you could just save the fact that they collected a specific loot box, therefore preventing them from collecting it again

Is there a way or are there lines of code that can determine the length of time that has passed since a player joined the last server and a new one? That’s all I need. Thanks. Can I use os.time()?

You can just save the os.time when a player joined using data stores and when they join again, check the difference of the current os.time compared to when the player joined before.

1 Like