if active then
if (not proceeded) then
if key.UserInputType == Enum.UserInputType.MouseButton2 then
mouseHolding = false
end
if key.KeyCode == ThrottleUp or key.KeyCode == ThrottleDown then
increasing = false
decreasing = false
elseif key.KeyCode == YawLeft then
leftYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == YawRight then
rightYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == FlapsDown then
FlapsDown = 0
FlapMoTor.MaxVelocity = 0.2
FlapMoTor.DesiredAngle = -0.6
elseif key.KeyCode == FlapsUp then
FlapsUp = 1
FlapMoTor.MaxVelocity = 0.2
FlapMoTor.DesiredAngle = 0
end
end
end
end)```
#Flaps script
10 messages · Page 1 of 1 (latest)
Right now they go all the way down, then all the way up. But when I try again they dont continue working
acc hold on gotta make the flaps seperate to make them look good
if active then
if (not proceeded) then
if key.UserInputType == Enum.UserInputType.MouseButton2 then
mouseHolding = false
end
if key.KeyCode == ThrottleUp or key.KeyCode == ThrottleDown then
increasing = false
decreasing = false
elseif key.KeyCode == YawLeft then
leftYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == YawRight then
rightYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == FlapsDown then
FlapsDown = 0
FlapLeft.MaxVelocity = 0.2
FlapLeft.DesiredAngle = -0.6
FlapRight.MaxVelocity = 0.2
FlapRight.DesiredAngle = -0.6
elseif key.KeyCode == FlapsUp then
FlapsUp = 0
FlapLeft.MaxVelocity = 0.2
FlapLeft.DesiredAngle = 0
FlapLeft.MaxVelocity = 0.2
FlapLeft.DesiredAngle = 0
end
end
end
end)``` new script
** You are now Level 9! **
if active then
if (not proceeded) then
if key.UserInputType == Enum.UserInputType.MouseButton2 then
mouseHolding = false
end
if key.KeyCode == ThrottleUp or key.KeyCode == ThrottleDown then
increasing = false
decreasing = false
elseif key.KeyCode == YawLeft then
leftYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == YawRight then
rightYaw = 0
TailMoTor.MaxVelocity = 0.05
TailMoTor.DesiredAngle = 0
RudderTurnPart.DesiredAngle = 0
RudderTurnPart.MaxVelocity= 0.05
elseif key.KeyCode == FlapsDown then
FlapsDown = 0
FlapLeft.MaxVelocity = 0.2
FlapLeft.DesiredAngle = -0.6
FlapRight.MaxVelocity = 0.2
FlapRight.DesiredAngle = -0.6
elseif key.KeyCode == FlapsUp then
FlapsUp = 0
FlapLeft.MaxVelocity = 0.2
FlapLeft.DesiredAngle = 0
FlapRight.MaxVelocity = 0.2
FlapRight.DesiredAngle = 0
end
end
end
end)``` fixed smthing
scratch that trying another way
alr so, switched to a seperate script and made it a local script
heres my code
local FlapsDown = Enum.KeyCode.F
-- flap moters
local FlapsLeft = script.Parent.Parent.Parent.Aircraft.Main.Moters.FlapsLeft.Motor
local FlapsRight = script.Parent.Parent.Parent.Aircraft.Main.Moters.FlapsRight.Motor
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if Enum.KeyCode == FlapsDown then
FlapsLeft.MaxVelocity = 0.2
FlapsLeft.DesiredAngle = 0.6
FlapsRight.MaxVelocity = 0.2
FlapsRight.DesiredAngle = 0.6
elseif Enum.KeyCode == FlapsUp then
FlapsLeft.MaxVelocity = 0.2
FlapsLeft.DesiredAngle = 0
FlapsRight.MaxVelocity = 0.2
FlapsRight.DesiredAngle = 0
end```