VehicleSeats are EXTREMLY UNRELIABLE!

My Goal: Sitting the player onto a VehicleSeat and getting Steer and Throttle

This is not a new issue.

I have tried everything. And my last resort is to write a full input system from scratch for all platforms.

The humanoid IS SITTING inside the seat. 50:1 times the steer and throttle are unresponsive.

Both the Client and the Server know the humanoid is seated and are aware and loaded under occupant. Yet no throttle or steer.

I have tried:

  • NetworkManagment
  • RemoteEvents
  • Humanoid Redundancy Checks
  • Client and Server Replication and checks
  • Resetting Redundancy
  • Resetting Cooldown
  • Using :Sit
  • Using :IsLoaded Checks
  • Using Roblox Touch interest
  • Loop Sitting
  • Unseating and resetting Seat
    and probably some more that I cant think about at the moment.

TLDR: VehicleSeats are unreliable and its frustrating because it is a prefect easy way to get control floats for each platform. I have been stuck on this problem for 2 months now. Some things make it worse, and some things help, but never %100.

My main interest in making this post is sort of a last resort.
ANY input would be greatly appreciated or for someone to look into this. I can provide alot of information and code snippets if needed (I have tried over 50 different solutions to the same problem and with 3 different vehicle / client systems)

For now I’d like to leave a link to the game so people can experience this themselves. I will leave on a client print of the Steer and Throttle Floats for the seat the player is currently sitting in running on a HeartBeat Update.

Current Logic:
1: Clone from Replicated First
2: Repeat until humanoid and HRP exists
2: Place HRP and Seat at same CFrame
3: Parent Seat to Character
4: pcall :Sit Humanoid
5: If not seated or error regrab humanoid and try again

There is also a redundant :Sit that sends to client to make sure seat exists and if still not seated send back to server and delete seat and try again (making sure client knows seat is there

2 Likes

There is a cooldown of 3 seconds when a seat is spawned (or when a player leaves a seat).

Maybe that is causing some issues.

I made quick file that spawns a seat. I tried many times and did not see any failures.

Seat.rbxl (60.8 KB)

The 3 second delay is apparent when you try and sit in a seat immediately after spawning it.

While this is true for physically touching the part, I don’t believe there is a mandatory cooldown for :Sit . Hence why my system now work MOST of the time. I’ve placed a wait on the main game but I’ve tried this before and it only helps decrease rate of getting stuck, never fully unless I did something ridiculous like a 5 second wait. But even then with the 5 seconds player will still get stuck just increases the rarity of it happening to “almost” never.

For now I have opted to just teleport he player instead of killing them for %90 of actions. And for character added this is what I am leaving it as.

local function characterSpawn(Player: Player, Character: Model)
	if Character:FindFirstChild("Board") then
		Character.Board:Destroy()
	end
	
	local Humanoid
	repeat
		Humanoid = Character:FindFirstChild("Humanoid")
		task.wait()
	until Humanoid
	
	task.spawn(function()
		local BoardClone = StartBoard:Clone()
		local Platform
		while not Platform do
			Platform = BoardClone:FindFirstChild("SkateboardPlatform")
		end

		Player.MyBoard.Value = Platform
		local rotFix = CFrame.Angles(0, math.rad(-90), 0)
		local yOffset = 10
		local xrandomOffset = math.random(-10,10)
		local zrandomOffset = math.random(-10,10)
		local checkpointPosition = workspace.Checkpoints[Player.Stage.Value].Base.Position
		local adjustedCFrame = CFrame.new(checkpointPosition.x + xrandomOffset, checkpointPosition.y + yOffset, checkpointPosition.z + zrandomOffset) * rotFix
		BoardClone.SkateboardPlatform.CFrame = adjustedCFrame
		local HRP
		while not HRP do
			HRP = Character:FindFirstChild("HumanoidRootPart")
		end
		HRP.CFrame = Platform.CFrame

		BoardClone.SkateboardPlatform.CanCollide = false
		BoardClone.SkateboardPlatform.Anchored = false
		BoardClone.Name = "Board"
		BoardClone.Parent = Character

		task.wait()
		task.wait(0.5)
		
		if Humanoid == Character:FindFirstChild("Humanoid") and Humanoid.Health ~= 0 then
			local success, err = pcall(function()
				BoardClone.SkateboardPlatform:Sit(Humanoid)
			end)
			if not success then
				warn(err)
			end
		else
			Player:LoadCharacter()
		end
	end)
end

Its redundant and messy I know! Its been months of iteration to try to get it %100

From my 3 tests of 1000 resets I am getting an average success rate of 865:1 on respawning with the code above.

The Coroutine helps the most!, the task.wait(0.5) seems to be the sweetspot for not too slow and still pretty reliable. If I bump it up to 1 or even 3-5 it seems to help even more STILL NOT %100 but pretty rare, just too slow visually for my players.

Still annoying that I can’t rely on the VehicleSeat to work %100 of the time. But for now Teleporting the player for almost all actions will keep the game playable and keep players from getting stuck down to <%3.

This is still an issue after all these years - I would like to share a workaround that has been working for me.

I have been using a workaround that @EgoMoose has provided in this post

The provided code in the post goes in to PlayerController → ControlModule

Replace the following with the code provided under the “OnCharacterAdded” function in the ControlModule:

Hopefully this helps you all in the meantime while we wait for Roblox to fix this.
(And thank you EgoMoose!!)

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.