Making hack proof data like stamina not lag?

Hi, I know how and why to use remotes for preventing hackers, and I’m not making any script right now, but I was wondering how to make stuff like this not laggy. For example, if I made a stamina system and if a client’s WiFi is slow, it would talk longer to fire the server to ask to refill the stamina. the only way I think of fixing this was to handle it all on the client’s side, but then there is no server to check if they’re hacking. And if the stamina is like the kind in Legend of Zelda where it refills slowly, it would probably be bad to just fire the server for each 1 energy out of 100, since it would just randomly go at normal speed, then slow(from lag) and just keep doing that.

What is the best way to make things like this?

1 Like

Try not to track the character’s stamina from server, but the distance the character has traveled within an allotted window of time. You can choose to rubber-band their character or something if the character seems to move a bit for far too long. Ping compensation may be considered. In general, just watch the available parameters and see if it makes within the predictions, or if it appears as an anomaly.

Technically, any game is kinda modifiable as long the resources are available for use.

1 Like