Roblox values changing have some type of delay?


As seen in the video, i could reload while sprinting if i pressed sprint, and then R really fast. I have checks for these but it still passes and idk why

if Input.KeyCode == Enum.KeyCode.R and ToolActuallyEquipped.Value and not Gameprocessed then

if Viewmodel and not HoldingAutoButton and not Reloading.Value and Values.Ammo.Value < Ammo and Values.SpareAmmo.Value > 0 and not **Sprinting.Value**  then

I have a check to make sure the user isnt sprinting but it still lets you
The way i enable the sprint value is trough remotes, which then the serverscript puts the value to true, anyone know a fix for this?

1 Like

It takes time for the server to receive the remote and then set the sprint value to true. You can set the sprint value locally on the client to avoid the latency.

1 Like

but the server also has to detect the sprint value

1 Like

ive set on setting the sprint on the client, then sending a remote to the server to make the sprint value true for everyone, this will thus work better for client and stay the same for server which is already good