Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a system to move Ailerons from the plane with the Mouse cursor? [closed]

Asked by 4 years ago

I'm making a Cessna 172 Skyhawk at Roblox Studio, my expectation is that when the player sits in the driver's seat, he can move the mouse, and at the same time he moves the mouse, move the Ailerons on the plane's wings, that is, the player sits on the chair, and then he can move the mouse pointer across the screen, and according to the direction of the mouse, the Ailerons, Rudder and Elevators move as they do, just like a pilot moving the plane's joystick, and consequently moving those surfaces. I also need to allow the player to operate a lever to lower the flaps. In addition to needing another "lever" to be able to change the engine power and another button, more specifically like a car key, literally that, for engine On and Off. I'm a beginner in Roblox Lua, and I have a lot to learn, in fact, if you are reading this, tell me a good place to learn Roblox Lua, becauseI NEED TO LEARN. I'm not American, sorry for any English mistakes. note: The Elevators at the tail end of the plane, are attached with Hinges, to have the freedom to rotate 65 degrees upwards and 65 degrees downwards, as it is more or less in the Cessna 172, the rudder is also attached with a hinge, giving it the freedom to turn 60 degrees to the right and 60 degrees to the left. I just need to lay out the Flaps and Ailerons, and after that, I will need help with scripts, because as I already said, I need a system like this: The player, sitting on the driver's seat, when moving the mouse to the right of the screen, the left Aileron raises, and the Rudder turns to the Right. And with the player pressing the F key, the flaps go down 10 degrees, pressing again 15 degrees, pressing again 35 degrees, then 40, and pressing again, the flaps retract and stay straight on the plane's wing. And a very important thing too, I need that when the player presses W, a BodyThrust that I put on his propeller, increase the Throttle, to simulate the engine's Throttle, press S decreases, and that at the same time that happens, a BodyAngularVelocity increase or decrease the angular speed so that the propeller, which is attached to the plane with a hinge, can spin faster when the engine has a lot of power, and slower when the engine is slow. Again, I want your tips on how I could learn more about Roblox Lua, I only know the basics, loops, variables, print, Vector3, Instance.new, and I try to learn functions, in fact, it is with the functions that it can all be possible.

Closed as Not Constructive by Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?