Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Possible to set VehicleSeat.Throttle programatically?

Asked by 5 years ago
Edited 5 years ago

I am trying to make a vehicle drive without pressing 'w'. I am able to set VehicleSeat.Throttle to 1 in a loop, however, it drops back to 0 again, and setting to 1 in a loop only results in the vehicle stuttering forward. Is there any way to persistently set Throttle so the vehicle will travel smoothly at full (or partial) speed? (And steer while we're at it. Setting steer seems to have the same behavior)

The code:

local seat = script.Parent

while true do
    seat.Throttle = 10
    wait(0.01)
end
0
Include your code User#24403 69 — 5y
0
He's asking a question, not a question about his programming User#25448 0 — 5y
0
He knows that, he wants to see what he has to try and fix it. DinozCreates 1070 — 5y
0
Code added to question. funitude 5 — 5y
View all comments (3 more)
0
this just constantly sets the throttle to 10, the while loop isnt doing anything DinozCreates 1070 — 5y
0
You have to keep setting the throttle because it drops back to 0. funitude 5 — 5y
0
Air resistance, but this is roblox so that doesnt matter. LoganboyInCO 150 — 5y

Answer this question