Hi dev forum, I’ve been having some trouble making my vehicle chassis be able to drive and I have no clue what’s causing it, I made the hinges their respective actuator type (servo for the steering and motor for the drive) but It still won’t work and doesn’t move and the steering doesn’t work
I’ve tried different scripts and tried making my own but however I can’t find out why none of the inputs are doing anything
Heres my the script I have with it right now.
-- get the specifications
local speed = script.speed.Value
local acceleration = script.acceleration.Value
local steeringspeed = script.steeringSpeed.Value
local steeringangle = script.steeringAngle.Value
-- set up the shortcuts
local vehicle = script.Parent.Parent
local seat = script.Parent
-- find the tires
local FL = vehicle.Constraints.MotorFL -- front left
local FR = vehicle.Constraints.MotorFR -- front right
local BL = vehicle.Constraints.MotorBL -- back left
local BR = vehicle.Constraints.MotorBR -- back right
-- find the steering mechanism
local steerA = vehicle.Constraints.ServoL
local steerB = vehicle.Constraints.ServoR
-- set up wheels' motor accerlation
FL.MotorMaxTorque = acceleration
FR.MotorMaxTorque = acceleration
BL.MotorMaxTorque = acceleration
BR.MotorMaxTorque = acceleration
while true do
-- power the wheels
velocity = seat.Throttle * speed -- use the seat's throttle to determine the wheels' action (backward? forward? nothing?)
FL.AngularVelocity = velocity
BL.AngularVelocity = velocity
FR.AngularVelocity = -velocity
BR.AngularVelocity = -velocity
wait()
-- steering
steering = seat.Throttle * speed
steerA.AngularSpeed = steeringspeed
steerA.ServoMaxTorque = 100000000
steerA.TargetAngle = steeringangle*seat.Steer
steerB.AngularSpeed = steeringspeed
steerB.ServoMaxTorque = 100000000
steerB.TargetAngle = steeringangle*seat.Steer
end
I have everything in a folder if for some reason thats the cause of my problem but I doubt it
Also heres a video of my problem
I’m new here so if you need any more info that I forgot to give please ask