I am trying to make a steering wheel for my ship that rotates left/right depending on if the Steer of the ship itself is 1 or -1 and stops when the ship isn’t rotating. For some reason, it doesn’t rotate at all.
local Wheel = script.Parent
local Steer = script.Parent.Parent.VehicleSeat.Steer
while true do
wait()
if Steer == 1 then
for i = 1, 20 do repeat
wait(0.001)
Wheel.Orientation = Vector3.new(Wheel.Orientation.X+1, Wheel.Orientation.Y, Wheel.Orientation.Z)
until Steer == 0
end
end
end
while true do
wait()
if Steer == -1 then
for i = 1, 20 do repeat
wait(0.001)
Wheel.Orientation = Vector3.new(Wheel.Orientation.X-1, Wheel.Orientation.Y, Wheel.Orientation.Z)
until Steer == 0
end
end
end