movement = Vector2.new()
car.DriveSeat.Changed:connect(function(property)
if property == "Steer" then
movement = Vector2.new(car.DriveSeat.Steer, movement.Y)
elseif property == "Throttle" then
movement = Vector2.new(movement.X, car.DriveSeat.Throttle)
end
end)
you also need a run service that. makes it move use Wait() for connect not function
else if you want make it stable on every fps use that method by using 60 / dt
Also you doing the whole thing wrong use seat.Lookvector for the math since it will go the wrong side
and for it to stop use
for i, v in pairs(car:GetChildren()) do
if v:IsA("BasePart") then
mass = mass + (v:GetMass() * 196.2)
end
end
and use if
if movement.Y ~= 0 then
-- do your code here Make sure you calculate the look vector for steer not throttle