I want to make a car but I don’t know where to start. For example, what should I start learning about first to make cars? Should I learn about constraints and attachments first, or scripting an actual car first? Thanks!
3 Likes
I just made my first car, but the problem is it is only able to move back and forth, it can’t steer properly.
Here is the script:
local seat = script.Parent
local car = seat.Parent
local leftDrive = car.Part1.LeftDrive
local rightDrive = car.Part2.RightDrive
local steerHinge = car.FrontAxle.SteerHinge1
local steerHinge2 = car.FrontAxle.SteerHinge2
local steeringAngle = 30
local maxSpeed = 10
local function onChange(property)
if property == “Steer” then
steerHinge.TargetAngle = steeringAngle * seat.Steer
end
if property == “Throttle” then
leftDrive.AngularVelocity = seat.Throttle * maxSpeed
rightDrive.AngularVelocity = seat.Throttle * -maxSpeed
end
end
seat.Changed:Connect(onChange)