They don’t rotate smoothly nor simultaneously. I think it’s because it’s a for i in pairs loop but not quite sure. Help is appreciated!
https://gyazo.com/d8f50b5678ef189a06d426bce9e51239
local turnAngle = 40
local servos = script.Parent.Servos:GetChildren()
local function steerRight(servos)
script.Parent.VehicleSeat.PrismaticConstraint.Enabled = false
for _, servo in pairs(servos) do
print(servo.TargetAngle)
if servo.TargetAngle <=turnAngle and servo.TargetAngle > -turnAngle then
servo.TargetAngle = servo.TargetAngle-turnSpeed
--servo.AngularSpeed = TurnSpeed
end
end
end
local function steerLeft(servos)
script.Parent.VehicleSeat.PrismaticConstraint.Enabled = false
for _, servo in pairs(servos) do
print(servo.TargetAngle)
if servo.TargetAngle < turnAngle then
servo.TargetAngle = servo.TargetAngle+turnSpeed
--servo.AngularSpeed = TurnSpeed
end
end
```[Uploading: d8f50b5678ef189a06d426bce9e51239.mp4...]() ![d8f50b5678ef189a06d426bce9e51239|video](upload://siuaSZceDdM1HsXG2W6TP2f6xmw.mp4)