VehicleSeat Unreliable - Sometimes Doesn't Work

Hey everyone!

A fix for this was just released. Please update this thread if anyone continues to see this issue.

Thanks!

2 Likes

hey, uh, did this fix happen to break sitting entirely?
i would post a bug report on this but i can’t because no one can be upgraded to regular anymore.

anyway, seats and scripts that force the player to sit no longer work. players just… can’t sit. it doesn’t happen.

2 Likes

Hey, the change was reverted.

Can you send me the place that broke?

Thanks!

1 Like

this appears to have fixed it!
this occurred on multiple places, as multiple users were experiencing the issue, so it appears it was site-wide. do you still want me to dm you the place where i first encountered this bug?

Yes, please send the places you experienced this issue.

Thanks!

1 Like

Just a heads up I’m still experiencing this issue and there is no fix in place (atleast for me)

3 Likes

I am still experiencing this issue as well.

2 Likes

Still happening for me as well.

3 Likes

bumb, im still experiencing this bug, i clone the vehicle from RepStore to a folder in the workspace and then use :Sit() but the player cant controll the vehicle. If the player jumps out of the seat the player cant enter it again by walking over the seat

I think I found a solution that fixed the problem for me. In a local script, I waited for the vehicle to load using ContentProvider:PreloadAsync({VehicleSeat}). After it loads, I fire a RemoteEvent to the server where a server script will call VehicleSeat:Sit(Humanoid). Here is the code:

Local Script:

game.ContentProvider:PreloadAsync({seat})
task.wait()
seat:WaitForChild("IsLoaded"):FireServer()

Server Script:

seat.IsLoaded.OnServerEvent:Connect(function()
	seat:Sit(humanoid)
end)

In my game, I put a RemoteEvent name IsLoaded inside the VehicleSeat. Sometimes it didn’t finish loading the RemoteEvent when I called it so I used WaitForChild to fix that.

1 Like

to anyone who still relies on vehicleseat, read this

roblox moved away from having “use-case” classes years ago because it goes against game engine design principles

in 2008, we had glue, capture flags, skateboards, vehicleseats, build tools, hinges
not made using scripts but hard-coded into the engine as classes
Instance.new(“SkateboardPlatform”)

the only supported modern class in this category would be the proximityprompt

but that was added in order to make ClickDetectors redundant because they caused a bad user experience on mobile (you can’t tell what is clickable on mobile with clickdetectors)

in modern roblox, just like in any other game engine, the classes are puzzle pieces that make up something functional when scripted

vehicleseat is the only one of those 2008 examples that isn’t deprecated because of it’s continued use in games, and i don’t expect roblox to continue fixing it, it literally uses deprecated weld objects to attach people to the seat

i think someone made a VehicleSeat2 chassis that is scripted and offers more control, maybe look into it

expect clickdetector and vehicleseat to deprecate eventually

3 Likes

The VehicleSeat issue still occurs.

Recreating the problem can be tricky since it rarely happens. It usually occurs when a player joins the game, and it might be connected to high ping or server (client?) lag, but I’m not entirely sure.

There’s also another issue (though I’m not entirely sure if it qualifies as a bug), where occasionally, when a player is automatically seated upon joining, it disrupts the seating animation.

Broken:
image

How it should look like:
image

While writing this message, the VehicleSeat didn’t properly seat my humanoid. When this bug occurs, the HUD doesn’t show up, and I cannot drive the ATV but sitting animation is being played. (When this happened there were no errors/warnings in the console at all.)

Here is the picture:

Code:

Players.PlayerAdded:Connect(function(player: Player)
	player.CharacterAdded:Connect(function(character)
		local ATV = Assets.ATV:Clone()
		local targetPosition = game.Workspace.Stages[player:WaitForChild("leaderstats", math.huge).Stage.Value].CFrame.Position
		ATV.Parent = game.Workspace.PlayersATVS[player.Name]
		ATV:SetPrimaryPartCFrame(CFrame.new(targetPosition) * CFrame.Angles(0, math.rad(-180), 0))
		spawn(function()
			repeat task.wait() until player.Character:FindFirstChild("Humanoid")
			repeat ATV.ATVSeat:Sit(player.Character.Humanoid) until ATV.ATVSeat.Occupant == player.Character.Humanoid
		end)
	end)
end)

If you want to try the game yourself here is the link to it: ATV [DEV] - Roblox

2 Likes

I realize this is a very old topic, but I wanted to bump it for anyone else who stumbles on this in the future.


I came across this issue in a project I was working on. This reply helped, but I found using Humanoid.Seated to be unreliable. Sometimes this event does not fire if you directly transition the humanoid from one seat to another.

I found watching Humanoid.SeatPart to be a much better alternative as it doesn’t fire false positives and also properly handles the direct transition problem I outlined above:

self.humanoidSeatedConn = self.humanoid:GetPropertyChangedSignal("SeatPart"):Connect(function()
	local active = not not self.humanoid.SeatPart
	self:OnHumanoidSeated(active, self.humanoid.SeatPart)
end)

(it’s also a fair bit more concise)

9 Likes

just wanted to bump this I am experiencing this issue still. The hud doesn’t show up but the player does “sit”.

I ended up fixing the problem by writing my own calculation for throttle and steering. Here is it if anyone needs it:

                        local moveDir = humanoid.MoveDirection
			local normal = Vector3.yAxis
			
			local throttleProjection = VectorUtility.ProjectVectorToPlane(normal, camera.CFrame.LookVector).Unit
			local throttle = moveDir:Dot(throttleProjection)
			
			local steerProjection = VectorUtility.ProjectVectorToPlane(normal, camera.CFrame.RightVector).Unit
			local steer = moveDir:Dot(steerProjection)
local VectorUtility = {}

function VectorUtility.ProjectVectorToPlane(normal, vector)
	local projection = VectorUtility.ProjectVectorToVector(vector, normal)
	
	local planeProjection = vector - projection
	
	return planeProjection
end

function VectorUtility.ProjectVectorToVector(vectorToProject, ontoVector)
	local dotProduct = vectorToProject:Dot(ontoVector)
	local ontoVectorMagnitudeSquared = ontoVector:Dot(ontoVector)

	local projection = ontoVector * (dotProduct / ontoVectorMagnitudeSquared)
	
	return projection
end

return VectorUtility

2 Likes

Bump.

As niche as this issue is, it has potential to make some games unplayable. The solutions provided in the thread work quite well, but it would be better for the engine bug to be fixed, instead of forcing developers to settle for a band-aid solution.

This is in the release notes and I’d imagine would solve the issue once and for all… hopefully

3 Likes

It took them a while, but hopefully it indeed ends now.

This bug still occurring for me right now. Is the fix live?

I also experience similar issues in my experience Emergency Hamburg - Roblox. I believe it’s the same bug.

The issue only happens with a bad internet connection.
For replication, I use a network tool called Clumsy to simulate a high ping and a network package drop rate of 10%.

  1. The player slightly falls when entering the seat - in our game, VehicleSeat:Sit() is called server-side.
  2. steer/throttle is not being set, my vehicle scripts work when I set them manually, but the player input is not forwarded.
  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.

1 Like