Car steering turning opposite directions?

So I have a car that worked perfectly fine and then started turning the opposite direction than it was originally. I messed with this a little but it never worked the same again, any help?

if Base then
	if Left then
		leftMotor = Instance.new("Motor6D", car)
		leftMotor.Name = "LeftMotor"
		leftMotor.Part0 = Left
		leftMotor.Part1 = Base
		leftMotor.C0 = CFrame.new(-WheelSize/2-Left.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,-math.pi/2)
		leftMotor.C1 = CFrame.new(Base.Size.x/2+Left.Size.x+WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
		leftMotor.MaxVelocity = motorSpeed
	end
	if Right then
		rightMotor = Instance.new("Motor6D", car)
		rightMotor.Name = "RightMotor"
		rightMotor.Part0 = Right
		rightMotor.Part1 = Base
		rightMotor.C0 = CFrame.new(-WheelSize/2-Right.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
		rightMotor.C1 = CFrame.new(-Base.Size.x/2-Right.Size.x-WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
		rightMotor.MaxVelocity = motorSpeed
	end
end

If you need the full script let me know

There is a Steer property on Vehicle Seats
Turning left the property is -1
and turning right the property is 1

Just test for a change in the property, and then turn the wheels according to he steer property.

In that case, try swapping the code, add the left code on right, and the right one in left. I think it should help fix your problem. :grin:

So after a long time of testing, I was able to see that the code that I provided, did not control the vehicle steering, these 2 scripts do, and I was able to edit these to the best of my ability to make them work, but for some reason, unless the car is moving, the steering is still going the wrong directions, but if I am moving, it goes correctly, and with that, if im turning my wheels, go forward, and turn more, the wheels go weird and the car stops working (until you let go then it fixes itself)

The entire local script

wait(1)
SeatValue = script:WaitForChild("Seat")
if SeatValue:IsA("ObjectValue") and SeatValue.Value and SeatValue.Value:IsA("VehicleSeat") then
	seat = SeatValue.Value
	car = seat.Parent
	if seat:FindFirstChild("RocketPropulsion") then
		seat.RocketPropulsion:Fire()
	end
	local RemoteControlled = car:FindFirstChild("ControlByRemote")
	while seat:FindFirstChild("SeatWeld") and RemoteControlled do
		wait()
		if not RemoteControlled:IsA("VehicleSeat") then
			break
		end
		RemoteControlled.Throttle = seat.Throttle --- Where the turning part is
		if car:FindFirstChild("LeftMotor") then
		print("left motor")
		car.LeftMotor.DesiredAngle = seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6)
		end
		if car:FindFirstChild("RightMotor") then
			print("right motor")
			car.RightMotor.DesiredAngle = seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6)
		end
		if car:FindFirstChild("Configuration") then
			if seat.Throttle == 1 and car.Configuration:FindFirstChild("Forwards Speed") then
				RemoteControlled.MaxSpeed = car.Configuration["Forwards Speed"].Value
			elseif seat.Throttle == 0 then
				RemoteControlled.MaxSpeed = 0
			elseif seat.Throttle == -1 and car.Configuration:FindFirstChild("Reverse Speed") then
				RemoteControlled.MaxSpeed = car.Configuration["Reverse Speed"].Value
			end
		end
	end
	if seat:FindFirstChild("RocketPropulsion") then
		seat.RocketPropulsion:Abort()
	end
end

SERVER SCRIPT (ONLY PART OF IT)

while true do
	for i = 1, 60 do
		wait()
		if workspace.FilteringEnabled then
			if car:FindFirstChild("LeftMotor") then
				if seat.Throttle ~= 0 then
				car.LeftMotor.DesiredAngle = seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6)
				print(seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6))			
			end
			if car:FindFirstChild("RightMotor") then
				if seat.Throttle ~= 0 then
				car.RightMotor.DesiredAngle = seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6)
				print(seat.Steer/math.rad(80-RemoteControlled.Velocity.magnitude*6))
			end
		end
		end
		end

I found that if I inserted a normal car model into ROBLOX, pressing A would go right, and pressing D would go left.

I think this is a problem on ROBLOX’s behalf.

Should I report it on here, if this is an actual roblox bug, it should be addressed.

You should go to Engine Bugs and file a report.

Hope this helped!

I just inserted the Motorcycle free model, and it seems to be working fine, so is it a roblox bug? I did try with the sedan and it was broken, but it could just be the code?

I will try and construct a basic hinge car and see if the same thing happens.

1 Like

So I have a car that worked perfectly fine and then started turning the opposite direction than it was originally.

I think this is because of the changes that happened to Motor6Ds. Snippet from the devforum post:

in models that you rigged yourself or with third-party tools and happen to be using Motor6Ds “backwards”, your game may be affected. Soon they will be not-backwards, which might mean “backwards” for you.

Here’s the link: [Live] Changes to Motor6D.Transform and Motor.CurrentAngle

3 Likes

Oh, so how do I fix this? I am not the smartest person when it comes to Motor6D.

1 Like

Not sure, you should see the original post to see if someone made a solution.