I want to limit the math random for a motor desired, This is a wait script whichw ill will operate mathrandon run
However, i want to limit the Motor6D Desiredangle between 0.03 & 0.07, But i get this error:
18:52:38.212 - Workspace.Plane.Parts.WNGF_Model.HighAltitude_Wingflex:18: bad > argument #1 to 'random' (interval is empty) 18:52:38.212 - Stack Begin 18:52:38.213 - Script 'Workspace.Plane.Parts.WNGF_Model.HighAltitude_Wingflex', Line 18 18:52:38.213 - Stack End
b = script.Parent.Parent.Engine
wingflex = script.Parent.Parent.Wings_Motion
--LeftWingCenter.A.Motor.DesiredAngle = (math.random(MinimumFlex,MaximumFlex
LeftWingCenter = wingflex.Left.Outboard
RightWingCenter = wingflex.Right.Outboard
local MotorAngle = (0.03/0.07)
while wait(0.009) do
if b.Position.Y > 1 and b.Position.Y < 9999 then
print('WingFlexing')
LeftWingCenter.A.Motor.MaxVelocity = 0.005
RightWingCenter.A.Motor.MaxVelocity = 0.005
for x = 0.1,1 do
wait(math.random(1,2))
print('WingFlex Motion 1')
LeftWingCenter.A.Motor.DesiredAngle = (math.random(MotorAngle))
RightWingCenter.A.Motor.DesiredAngle = (math.random(MotorAngle))
end
end
end

1 comment
Wrong Question, my dude....