Hi! I’m making a plane, but, uh, I don’t know how to use BodyGyro.
The plane works by pressing buttons, and for Z and X are the turning keys (z is left x is right)
I would use planeSeat.CFrame = planeSeat.CFrame * CFrame.fromEulerAnglesXYZ(0, -000000000.1, 0), but it doesn’t turn smoothly. How do I use BodyGyro to do this?
local db = true
UserInputService.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.X then
while db == true do
wait(0.1)
BG.CFrame = BG.CFrame * CFrame.Angles(0, -1000, 0)
--planeSeat.CFrame = planeSeat.CFrame * CFrame.fromEulerAnglesXYZ(0, -000000000.1, 0)
BV.Velocity = planeSeat.CFrame.LookVector * 20
end
end
end)
UserInputService.InputEnded:Connect(function(key)
if key.KeyCode == Enum.KeyCode.X then
BG.CFrame = BG.CFrame * CFrame.Angles(0, 0, 0)
--planeSeat.CFrame = planeSeat.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 0)
db = false
wait(0.1)
db = true
end
end)