How the hell do you use vehicle seats?

This may sound like a stupid question but I’ve scowered the internet and not found a single solution. Every time I have a vehicle seat, it does not move anything at all.
I’ve tried grouping it with a part, welding it and hinges and attachments and so much more but it never did anything.
Is anyone able to help?

1 Like

The Vehicle Seat its just an object with properties that by default changes when a Player is using the seat and press keys or touch.

You should listen when those properties changes and get the new value of the property. Grab that value and feed a constraint like hinges or BodyMovers to apply movement into the model.

Place a script like this into the Vehicle Seat, sit on it and press keys like WASD, you will get prints in output, just use those numbers to feed your hinges/motors or physics instances

local vehicleSeat = script.Parent

local function onSteerInputChanged(val)
	print("Steer input:", vehicleSeat.Steer)
end

local function onThrottleInputChanged()
	print("Throttle input:", vehicleSeat.Throttle)
end

vehicleSeat:GetPropertyChangedSignal("Steer"):Connect(onSteerInputChanged)
vehicleSeat:GetPropertyChangedSignal("Throttle"):Connect(onThrottleInputChanged)

… I remember a very silly post I made a few years ago when I started in roblox engine… about this topic… I think it was my very first topic in DevForum… its pretty dumb… emm… but yeah… my dumb thing … I even want to delete it cause I feel kinda embarrased about it… hahah…

3 Likes

Where would I input the numbers into my constraint(sorry if this sounds stupid I’ve basically never used vehicle seats)

1 Like

You are using Hinge constraints? in Motor ActuatorType? Then just multiply the number and use it for the constraint AngularVelocity:

local maxSpeed = 20
local motor1 = car.Hinge1
motor1.AngularVelocity = seat.Throttle * maxSpeed

I dont even know if those constraints still updated and not deprecated… This is for a very basic car system. Read the posts I made in that topic link I sent, explain all details.
Honestly long time since I dont build a car under that approach.

And I would suggest look for a more updated and advanced approach, like BodyMovers and MoverConstraints

1 Like