How do I make a plane fly where my mouse is looking?

Probably lock a person to first person when he sits on the plane and then unlock it back if he gets off?

Edit:
I first thought of this just because flying in the plane in 1st person is cool.

Is there any other way to rotate a part other than bodygyro? I found some bug when I get into my plane, it turns itself in the opposite direction. And when I fly it is not because of what just flips the plane. I tried using orientation and rotation but nothing helps me. (I want to be able to fly in first person and third person)

FYI. Not sure if there’s another fix - But there’s an issue with Flight following the mouse that occurs when the mouse is over the Plane // Object.

The only fix I know is to Parent the Plane to the Player piloting it.

What I’ve come up with for my space ships is moving them with a Object.CFrame = Object.CFrame * CFrame.new(0,0,Speed) to make it move forward (If it goes backward simply change the Speed to -Speed) and CFrame.Angles(Pitch, Turn, Rotate) to make it rotate, pitch and turn accordingly. Now to get the Pitch and Turn values I use a UserInputService.InputChanged connection like this:

UserInputService.InputChanged:Connect(function(inputObject, GPE)
	local Vector = Vector2.new(inputObject.Position.X/Camera.ViewportSize.X * 2 - 1,
		inputObject.Position.Y/Camera.ViewportSize.Y * 2 - 1)*-Handling
	if math.abs(Vector.Magnitude) >= Deadzone then -- Define a deadzone, can be 0 if you want no deadzone.
		Pitch = Vector.Y
		Turn = Vector.X
	else
		Turn = 0
		Pitch = 0
	end
end)

Then run the CFrame change on a RunService.Heartbeat connection and use the DeltaTime argument like said in this thread and you’re good to go!
Please note I haven’t spent the full time to read this entire thread, but from the looks of it this is much simpler than whatever you are currently doing.
Hopefully this helps!

2 Likes

I will answer if It help me, thanks you.

how do I do this? Can you write this please?

So it’ll be something like:
Forgive lack of indent, this was written solely from memory as I’m away from ROBLOX atm.

PilotSeat.Changed:Connect(function(Property)
    if Property == "Occupant" then
    local Humanoid = PilotSeat.Occupant
    if Humanoid then
    Plane.Parent = Humanoid.Parent
    else
    Plane.Parent = game:GetService("Workspace") 
    end
    end
    end)
1 Like

Was this ever solved?

Working on something similar.

Still not solved. I gave it up because I couldn’t find a solution for a very long time

try getting scripts from roblox rocket ship gear
it allows u to go anywhere where your mouse is at

Body Movers like Body velocity and Body gyro can help.

sorry to bump this, but try looking at Crazyman32’s biplane model here

I tried it out and it has mouse guidence, also will keep plane from flying upside down lol

1 Like