VehicleSeat steer/throttle values sometimes not set by the client based on user input (also causing other weird effects)

Hi!

Our game Emergency Hamburg - Roblox has been experiencing issues with vehicles sometimes not driving for multiple months now. Now I found out that the reason for that is the fact that the steer/throttle values are not updated by the client in some cases. The issue will stay the whole time the player is in the vehicle - they must exit and enter again to continue driving.

The issue only happens with a bad internet connection.
For reproduction, I use a network tool called Clumsy to simulate a high ping and a network package drop rate of 10-15%. This causes the bug to happen maybe 1/20th of the time.

The bug looks like the following:

  1. The player slightly falls when entering the VehicleSeat - The seating happens server side by calling VehicleSeat:Sit().
  2. steer/throttle is not being set, my vehicle scripts work, and the car drives when I set these values on the VehicleSeat manually, but the player input is not forwarded to these values.
  3. When exiting the vehicle after that happened, the character also behaves weirdly and isn’t teleported out of the vehicle like it normally is - I suspect the humanoid.Seated Event is not called correctly here.

Bug Video: VehicleBugEmergencyHamburg.mp4 - Google Drive

After I made changes to the system how characters are hidden in vehicles (making it client-side) and therefore reducing the amount of data that needs to be replicated to the client when entering a vehicle, the bug seemed to happen a lot less, but especially a lot of mobile players are still complaining.

This bug seems to be pretty complex and I have not yet found a reproduction that works 100% of the time.
Feel free to ask if you need any additional info!

Expected behavior

I expect that the steer and throttle values of a VehicleSeat are always set on the client based on user input.

7 Likes

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes

Hey Felix - can you provide a repro scene where the bug reproduces?

Also, if you could share the settings you used for clumsy, that would be helpful as well.

-:skull:

1 Like

Hi!

I can’t really make a reproduction place, as this bug seems to involve many factors regarding network lag etc. which don’t exist in an empty place. But I will try to make a step-by-step description of how to cause the bug here:

  1. Join Emergency Hamburg - Roblox

  2. Open Clumsy and Input the following settings:
    Filtering: inbound or outbound
    Lag: Enabled and 50ms
    Drop: Enabled and 10%
    Then click start

  3. Locate your car (the one with the orange waypoint on top)

  4. Repeatedly enter your car (it could take 5-30 tries to cause the bug, maybe even more), until you slightly fall when entering your car and the car can not be driven. (Press W to check if the car will move, the engine starts automatically)

  5. If this happens, the game will not set the Throttle and Steer values on the VehicleSeat even though the player is sitting in it and making inputs, which causes the vehicle not to drive or steer. I checked this in Roblox Studio and the values are not set on the client side in these cases.

I hope that this allows you to reproduce the bug. If you need more info, feel free to contact me again.

~ Felix

2 Likes

This is something I’ve encountered in the past as well. This may be something related to the Sit() method of VehicleSeats. Sometimes the ‘user controls’ is not properly linked to the VehicleSeat, causing user input to fail. At least I can confirm step 2 has happened to me before. I dunno about 1 and 3. Due the ‘sometimes’ happening, it’s difficult to replicate.

I bypass this myself by just moving the character into the VehicleSeat and have the VehicleSeat and character link itself together through default behavior.

Apparently, this seems to be a long standing issue: VehicleSeat Unreliable - Sometimes Doesn't Work

2 Likes

I can confirm that there are still rare chances that the client fails to bind the controls to the VehicleSeat, and thus set steer and throttle values.

My setup is currently loading vehicles on a map couple hundred studs away from the player, then move the player in the vehicleseat several seconds later (I avoid the Sit method for the reason given). On rare occasions, this problem still occurs.

I could stop relying on throttle and steer and just make bind own controls to make the kart move, but throttle and steer are easier to work with and have my preference.