When I make a sprinting system should I use a remote event to detect when the player starts holding shift and then another one to detect when they let go? Or is there a better way to do this rather than using 2 remote events
It’d be better to just do it all on the client. It seems like something that should be done on the client too as clients have network ownership of their characters meaning they would move just as fast for other players.
Don’t use remotes for this, it’ll introduce more issues and complications like securing and latency.
Sprinting systems are usually client-sided since exploiters can just boost their speed anyways. You could, however, use remote events to figure out when a player begins sprinting and how long they should be sprinting. If any suspicious behavior is detected, you could kick them.
Hey, just wanted to chime in here!
Using remote events to detect when a player starts or stops sprinting can be a good option if you want the server to have some control over how long a player can sprint, like for stamina management or monitoring speed for anti-cheat purposes. It does add a bit of complexity, but it might be worth it if you need more control over the player’s movement. That said, client-sided sprinting is definitely simpler and can reduce latency if those server-side controls aren’t necessary.
do not use remote events for sprinting at all and handle all logic on the client.
using remote events will only cause significant delay
As for anti cheats, lag could cause false positives (for example, sending the “stop sprinting” packet could take too long)
But well, since you’re asking if you should be using 2 remote events for something like this; you should probably take a look at the code of other sprinting systems and check out how they handle things. You can then make your owner script based off of that
Oh I didn’t even know that character movement can be done on the client and still be seen on the server, thank you everybody for the help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.