So far I have this simple plane flying script here
local UIS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local shipPart = workspace.TestShip.PrimaryPart
local MAX_SPEED = 150
local SPEED = 50
local ACCELERATION = 1
game:GetService("RunService").RenderStepped:Connect(function()
shipPart.BodyVelocity.Velocity = workspace.CurrentCamera.CFrame.LookVector * SPEED
shipPart.BodyGyro.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, workspace.CurrentCamera.CFrame.Position + workspace.CurrentCamera.CFrame.LookVector)
if UIS:IsKeyDown(Enum.KeyCode.W) then
SPEED = math.clamp(SPEED + ACCELERATION, 0, MAX_SPEED)
elseif UIS:IsKeyDown(Enum.KeyCode.S) then
SPEED = math.clamp(SPEED - (ACCELERATION * 2), 0, MAX_SPEED)
elseif UIS:IsKeyDown(Enum.KeyCode.A) then
--roll left
--shipPart.BodyGyro.CFrame = shipPart.BodyGyro.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 90)
elseif UIS:IsKeyDown(Enum.KeyCode.D) then
--roll right
--shipPart.BodyGyro.CFrame = shipPart.BodyGyro.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, -90)
end
end)
The plane will fly in the direction of the camera. I want the plane to roll when the player presses A and D, but I am unsure how to approach this. Can someone help me?

4 comments
The tweening is unnecessary in this case since the code is ran every frame under RenderStepped, but I can instead just change the orientation of the part incrementally. I didn't even think of that for some reason, I guess I was just overthinking
However, I think I need to rotate the BodyGyro not the shipPart itself... I will leave this open for more answers for now
Also, I forgot to mention that since the ship will be comprised of multiple parts, the orientation of each of the parts will be different. Using this approach would cause all parts to have the same orientation, messing up the model
oh ok