I can’t help you much in this scenario then. My advice based on what you’ve said is to remove server input control entirely as that will lag regardless of what you do. The client should be handling all input and adjusting accordingly. The server should then update those values with a tween (or something similar) to compensate for latency.
Quick question did you set the network ownership of those bumper cars to the current driver? that usually has some adverse effects if not done correctly
The lag could be due to this infinite loop being too fast.
Correct me if i am wrong.
The true question is why is he listening for input when the roblox vehicle seat has steer and throttle already implemented and you could listen for changes in those making the load a whole lot less.
EDIT: he could also set network ownership of the vehicle and handle all the forces etc on the client because the client essentially ‘owns’ that vehicle making the server only handle things it needs to
This is a customized car system. I am not using a vehicle seat. I’ll try the network ownership idea though
That in my opinion is a terrible idea if you make the vehicles owner the client. Why that is a terrible idea is because ROBLOX’s Physics Engine, ROBLOX does not verify physics calculations meaning if the client has network ownership over the vehicle the client can exploit that and teleport all the vehicles out of the map or something like that breaking the game essentially, now you could verify the position of each vehicle is inside the map but you are already having issues with lag so that would probably cause more lag. Basically anything that’s owner is the client or that is unanchored can be controlled by the client. Well if you are specifically setting it to that client and not all of them you don’t have to worry cause they can only mess with there car.
Anything that shows up in the game is in the client- meaning the cars are already in the client anyway, and therefore can be exploited even without network ownership. Keeping it on the server isn’t going to help with that problem.
Ok what I am trying to say is if the cars are unanchored or something then the client can move them and it will replicate to other clients cause they have network ownership over it, but if the server has network ownership over something and the client moves it it will only replicate to them. But if you specifically set network ownership to a certain client only they can move it.
Exploiting the position of the car isn’t going to be much of a problem anyway, partly because the character’s network owner is already the client, and also because if a car did spawn out of the map, all it could do would be drive out and fall until it is destroyed, then respawns.
Ok because I thought you were making all the car unanchored or something which would make it so the client could move all the cars to where they wanted. My bad.
The car is unanchored. It uses Body Movers.
Make it so the server has ownership over it otherwise a client can teleport all the bumper cars out of the map thus breaking the game.
It will not break the game. The cars will respawn. Please stop making a big deal about this when it’s not even a problem. If I need help with exploits I will make a new post for that.
I’m pretty sure Roblox player movement is done locally and replicated to the server(Correct me if I’m wrong). I came to this conclusion because exploits done on the client already allow the player to teleport walk through walls etc and it replicates to the server. The way I think you would get a desirable result would be to handle the movement/physics of the cars locally then have checks on the server to handle suspicious behavior such as vehicles going out of bounds. If the server handles the movement then players will with no doubt have undesirable latency.
Yes, as I said before, the character’s network owner is the client. That does not affect movement out of the player’s model.
Setting network ownership means the client handles all the physics for said object, because you’re sending a remote to the server to update position of the car it takes time and latency which results in the lag you are recieving. Roblox has an excellent article on dealing with input lag and lag in general which I believe you should take a crack at because it talks about the usage of remote events.
You can fix this by either moving the player’s bumper cars locally, making them the NetworkOwner or using lag compensation methods (way more complicated!!! but also less exploitable) to offset their position based on ping/latency and locally correct by the result from the server.
Yes, I know what network ownership is.
Yes, but have you actually attempted to apply any of the things we have said to your car?
Yes. I just need it tested (didn’t have enough time for that yesterday, sorry).