VehicleSeat Unreliable - Sometimes Doesn't Work

still happening, in my case the controls dont work for about 5 seconds then starts working perfectly fine.

3 Likes

Getting this too. Roblox, pleaseeee fix it!!

I can confirm this is happening for me as well. Ran into this issue when I removed a wait(3) which was delaying my code but also preventing the issue.

Having the same issue. This is requiring me to figure out a workaround. I have done a few tests with this, and the only way to fix this, that I have found so far, is having the player get on manually, which is unreliable when you want a player to be forced there.

This is running on the server unlike other issues with the client.

This happens in a popular game known as Backstretch Battles Remastered. After spawning a car, and touching the seat to get into it, the roblox HUD does not show and the vehicle is unresponsive. you have to get out of the car then back in and it will start working.

Notice this is not using :Sit() , but by simply touching the seat. As you would normally get into a car.

This is super annoying. When you sit on the vehicle seat in studio it works for me but then once you sit in it during a regular game, the VehicleSeat doesn’t work at all. Please fix! Thank you!

I am having a similar issue with regular seats.

In my game, players are supposed to be seated when the game loads. I used to do this by rotating them 90 degrees and just dropping them onto the seat when they load. Today it doesn’t work anymore. They start just standing on the seat. The rest of the script still works fine.

I tried to fix it by forcing them to sit in the seat when the character loads using :Sit(). This works unreliably when the game initial loads. However, if the character respawns, then it works correctly.

Both methods still work perfectly in Studio. This sucks because it ruins the feel of my game. The player loading sitting down is important.

2 Likes

Any updates here?

Looks like devs have to fork the ControlModule to get fixes in a reliable amount of time. 4 months isn’t acceptable for a small change like this.

Would anyone be interested in a community version of the ControlModule thats always up to date?

3 Likes

Been experiencing this issue too, please fix this its super annoying
Edit, think I fixed it, bit different to the code above but seems to work, hopefully I didn’t break anything else
image

1 Like

This still seems to happen, even when using the :Sit method

2 Likes

Can confirm this happening, even after waiting 5 seconds and calling from the server.

1 Like

I made this report over 2 years ago now. Nothing has changed. I would recommend custom implementations of a vehicle seat for anyone else that is left struggling with this issue.

Easiest way is to just listen to changes to the Occupant property of the seat and enable/disable controls based on that. You of course will have to write your own code to figure out what the SteerFloat and ThrottleFloat values should be, and make sure to include all control interfaces compatible with your game (e.g. keyboard, gamepad, touch).

7 Likes

Anyone who is experiencing this issue, please respond with where you saw the issue and how to reproduce it thanks.

Finally! I am not at my computer right now, so I will send code tomorrow, but the way it happens for me is I spawn the car, then use the player sit function, it will sit the player but not let you drive, the module will not respond, and there is no speedometer. This happens 0.05% of the time, so it is hard to reproduce. It is like the vehicle seat just decides to give up.

@NoUniqueAddress
I finally, recently, figured out the issue here. It has to do with the player connecting to the seat but not receiving network ownership.

My reasoning behind this is that:
If you set the network owner of the vehicleseat to the player occupying it about a second after they get in the vehicle, this issue will not appear. I tended to find in the past that this issue typically happened to folks with poor connections more often than those with good connections, if that might also help narrow things down. Notably, it seems VehicleSeats are really finnicky with lag.

@MRKYLO20 Your issue [since I know your game RoStock Racing] is likely stemming from the fact you guys are using “Non-Vision Lag” scripts, where you’re setting the networkowner of the car to Nil [aka the server]. You’re likely doing this too fast after the player gets in the seat, so you’re severing the connection before it’s fully formed. Here’s a more improved version of that script I’m sure you guys are using.

local seat = script.Parent
local Players = game:GetService("Players")

seat.Changed:Connect(function(prop)
		if prop == "Occupant" then
			local humanoid = seat.Occupant
			local player = game:GetService("Players"):GetPlayerFromCharacter(humanoid.Parent)
			seat:SetNetworkOwner(player) -- set network owner to the player FIRST to make sure the connection is made instead of hoping the automatic connection takes hold
			wait(.5) -- added wait to make sure the connection is made
			seat:SetNetworkOwner(nil)
	end
end)
1 Like

This is an ongoing issue. To reproduce this:

  1. Parent vehicle to ReplicatedStorage

  2. Parent vehicle to Workspace via Script while simultaneously using :Sit() on the VehicleSeat and player’s humanoid.

  3. After being seated, you will notice that all controls are lost.

1 Like

As I alluded to, the issue is not obtaining NetworkOwnership correctly.

In your case, add a workspace:WaitForChild(car) to your code that’s parenting the car to workspace and then call for the Sit function.

Notably, your instructions only reproduce the issue sometimes. Only users suffering from lag would get an “everytime this happens” result.

Setting the network ownership did not fix the issue, I just tested this.

I am on Windows 11, if that helps.

I can reproduce this consistently by basically spamming A and D, I am on Windows 11. Here is me using the on-screen keyboard only (no physical keyboard used) and the seat steer (and maybe throttle, untested) alternates between 0 and 1 or -1

Can confirm, it would glitch even if everything is replicated in workspace, and even if it’s a VehicleSeat sitting on the ground, it’s broken