Vehicle Seat rarely not detecting inputs

Sometimes the VehicleSeat.Throttle doesn’t update when the user wants to go forward, I’ve already tried replacing Throttle with ThrottleFloat, and the same issue persists. Currently, when the user spawns in a car I make the player sit down using VehicleSeat:Sit(player.Humanoid) and the player can go ahead and drive around. However once in a blue moon, once the player is seated, the vehicle doesn’t move. Why is this happening? This bug doesn’t happen in studio, only on the Roblox app. I know this post is similar to this post made by Intended_Pun(VehicleSeat.Throttle does not change when player is put in seat with Sit() function) however that post is over 6 years old and unresolved.

Videos

The feature consistently working perfectly fine in studio:
The same thing inconsistently failing in the Roblox application:

Here is also the code for the script that detects if you’re pressing W if I somehow messed that up; It’s located in PlayerScripts and it’s a local script

game:GetService("UserInputService").InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.W then
		print("W pressed; User is attempting to go forward")
	end	
end)
game:GetService("UserInputService").InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.W then
		print("W depressed; User has stopped the attempt")
	end	
end)
2 Likes

Is this happening to anyone else or should I make this a bug report?

What is your current code? why the limit

Currently, the vehicle is being controlled by the VehicleSeat and joints,


therefor there is no code for the vehicle movement. The only related bit of code is when I teleport the player to the VehicleSeat.

game:GetService("ReplicatedStorage"):WaitForChild("Spawn").OnServerEvent:Connect(function(player, vehicle)
    local truck = game.ServerStorage.one.Truck
	local clone = truck:Clone()
	clone.Parent = workspace
	clone:MakeJoints()
	clone:WaitForChild("VehicleSeat"):Sit(player.Character:WaitForChild("Humanoid"))
end)

There are no errors in the output and currently, the code forces the player to sit in the seat, but once they are sat the vehicle seat isn’t detecting player inputs sometime. I tested that by adding this in the vehicle seat:

script.Parent.Changed:Connect(function(property)
    if property == "Throttle" or property = "ThrottleFloat" end
        print("Player input")
    else
        print(property)
    end
end)

I found out that the VehicleSeat never changed the Throttle or ThrottleFloat.
Strangely, this only happens in the Roblox application, not studio, everything works on studio.

After reading some more devforum posts, it might be issue with performance:

And issue post which isn’t fixed yet (after multiple years):

Fix for this seems to reseating for now, until Roblox does something (in 2030, if even then)

This is too crammed together. Give it a pause after it’s found, then sit the player.
These one line covers it all lead to timing errors.

Same for things like this … player.Character:WaitForChild(“Humanoid”).
It works more or less, but Humanoid being define before use is always better.
This is on the fly programming… Top down programming is the way to go.
(yes, I’m beyond picky)

I saw those and thought that there has got to be some sort of replacement for this issue lol. Thank you for your information!

Thank you so much! You’re a life saver! After allowing adequate time for the VehicleSeat to properly spawn in, the script constantly succeeded.

1 Like

Great, and now you know why I’m so picky. :joy: