Player needs to jump out of a vehicle seat and get in again to drive it

We’re doing a racing game where the player spawns in a car when it joins the game. The problem is that some people need to jump out and in so they can actually control it. If not, the thrust or steering propierties of the vehicle seat won’t change. I thought that this was a problem related to game-loading, but even with 5 extra seconds of loading starting when the character is added some player’s vehicleseats don’t detect steering or throttle. The weird part of all this is that it only affects certain players, not all of them. Here’s a part of the script that controls this stuff:

game.Players.PlayerAdded:Connect(function(plr)
totalPlayers = totalPlayers + 1
local pos  = totalPlayers
local racing = Instance.new("BoolValue", plr)
racing.Value = false
racing.Name = "Racing"

plr.CharacterAdded:Connect(function(char)	
	wait(5)
	local car = hovercar:Clone()
	local seat = car.VehicleSeat
	car.Parent = workspace
	seat:Sit(char:WaitForChild'Humanoid')
end)	

end)

2 Likes

I’m no pro, but I think it’s better to put your WaitForChild’Humanoid’ in the CharacterAdded function line.
I think it’s firing when the Character is added, but the Humanoid hasn’t been loaded yet.

I mean, I put it inside the character added function, in the sit one

But when the Character is added it’s firing, but the Humanoid may not be there yet.
Are you getting an error showing up that says it can’t find the Humanoid?

WaitForChild will wait for it to exist if it doesn’t already. That’s not the issue.

3 Likes

Nope, I don’t get any error in the console

Do you have any idea then of what could cause it?

I am having the same problem.

@aStRoJim, did you mange to find the root of the problem and/or a solution?
Please share!