Custom Input Controls & Network Delay

I want to enable the player to “control” a vehicle without the humanoid actually being the driver.
I’ve got my own handling for inputs, through the UserInputService. Ideally, I would like for the actual movement of the vehicle to be controlled by the server, to prevent exploiting, so I’ve setup RemoteEvents to fire when the player presses or releases keys.

However, some players report significant delay in control response, likely due to a high ping/higher network latency.

Is it feasible to create RemoteEvent-based custom user input controls, or do you have to use client network ownership and control to ensure smooth tactile response time?

Make the vehicle’s network ownership the client who is driving it. Then you don’t need to replicate the data to the server and back.

Right, however that allows an exploiter to change the position of the vehicle (and it’s a racing game)

Well if you want a zero latecy game(for the client perspective) you will have always have a trade off.

Given that the average ROBLOX user has 100-200ms ping, any server-sided solution to movement and control is always going to feel terrible. ROBLOX itself pretty much gives up when it comes to managing player position, with the server, for the most part, just replicating what the client tells it. As a developer the best way to handle this is with server-side checking of vehicle position, velocity, orientation, player input, etc, to provide exploit defense. The fact is that even a basic level of defense is more than enough to deter most exploiters, and trying to force everything to be server-sided will just ruin the game experience.

2 Likes

Thoughtful response, thanks @Danziig. I agree with your points. Since my original post, I actually revamped my game’s controls to be client-side, and the improvement in responsiveness is amazing.

Will try to find some good articles for server-side “sanity” checks to prevent exploit-cheating :v:

2 Likes