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

How do I add rolling to my plane?

Asked by 10 years ago

I've made a script that allows you to control a plane, but I still can't seem to add rolling to it. What do I mean by rolling? What I mean is when a plane does a trick like the "Barrel Roll" or when the plane simply spins.

a = false
d = false
mouse.KeyDown:connect(function(key)key = key:lower() if key == 'a' then a = true repeat wait() jet.CFrame = jet.CFrame *CFrame.Angles() until not a elseif key == 'd' then d = true repeat wait() jet.CFrame = jet.CFrame *CFrame.Angles() until not d end end) -- I chose not to wrtie numbers into the CFrame.Angles because that's unnecessary and doesn't work well with the BodyGyro
mouse.KeyUp:connect(function(key)key = key:lower()if key == 'a' then a = false elseif key == 'd' then d = false end end)

while not downed do
    gyro.cframe = CFrame.new(jet.Position, mouse.Hit.p)
    vel.velocity = jet.CFrame.lookVector *90
    cam:Interpolate(jet.CFrame *CFrame.new(0, 0, 50), jet.CFrame, 0.25)
    if jet.Position.x > 1025 or jet.Position.x < -1025 or jet.Position.z > 1025 or jet.Position.z < -1025 or jet.Position.y > 1500 then
        crash()
    end
    wait()
end

Is there an alternative way to add rolling to my plane? Test this here.. http://www.roblox.com/--?id=175214106

0
Nobody? xolbStudios 127 — 10y

Answer this question