<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=How_to_Make_a_Plane</id>
	<title>How to Make a Plane - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=How_to_Make_a_Plane"/>
	<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=How_to_Make_a_Plane&amp;action=history"/>
	<updated>2026-07-28T15:25:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.starfall.wtf/index.php?title=How_to_Make_a_Plane&amp;diff=225&amp;oldid=prev</id>
		<title>PRG: Created page with &quot;{{CatUp|Tutorials}} {{ScriptTutorial|Advanced|Building &amp; Lua}} __TOC__   == Introduction == This tutorial will guide you through the steps needed to create a simple plane from scratch.  It will then show you how to add the different features of airplanes, such as shooting, exploding when crashing, and customizing the look of your plane.  == Creating a Plane From Scratch ==  The plane will consist of these models:  Hangar, Plane, BodyKit, Parts.  We will start first by cr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=How_to_Make_a_Plane&amp;diff=225&amp;oldid=prev"/>
		<updated>2024-12-10T02:24:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{CatUp|Tutorials}} {{ScriptTutorial|Advanced|Building &amp;amp; Lua}} __TOC__   == Introduction == This tutorial will guide you through the steps needed to create a simple plane from scratch.  It will then show you how to add the different features of airplanes, such as shooting, exploding when crashing, and customizing the look of your plane.  == Creating a Plane From Scratch ==  The plane will consist of these models:  Hangar, Plane, BodyKit, Parts.  We will start first by cr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CatUp|Tutorials}}&lt;br /&gt;
{{ScriptTutorial|Advanced|Building &amp;amp; Lua}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This tutorial will guide you through the steps needed to create a simple plane from scratch.  It will then show you how to add the different features of airplanes, such as shooting, exploding when crashing, and customizing the look of your plane.&lt;br /&gt;
&lt;br /&gt;
== Creating a Plane From Scratch ==&lt;br /&gt;
&lt;br /&gt;
The plane will consist of these models:  Hangar, Plane, BodyKit, Parts.  We will start first by creating the Hangar model.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Hangar for the Plane === &lt;br /&gt;
The hangar for the plane is used to hold the plane safely off the ground.  It also makes it easier to climb aboard and easier to take off.&lt;br /&gt;
&lt;br /&gt;
In this example, we are using the simplest hangar: two bricks in the shapes of low walls - on which the wings of the plane will rest.  NOTE:  Add steps to the back of the hangar so you can climb up.&lt;br /&gt;
&lt;br /&gt;
[[Image:BasicHangar.png|550px]]&lt;br /&gt;
&lt;br /&gt;
Follow these steps in Roblox Studio to create the Hangar:&lt;br /&gt;
&lt;br /&gt;
– With the Workspace selected in the Explorer window, Select Insert &amp;gt; Object and select Model from the pop up window.&lt;br /&gt;
&lt;br /&gt;
– Name this model &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039; in the Explorer window.&lt;br /&gt;
&lt;br /&gt;
– Insert an object into &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039; of type IntValue, name it &amp;#039;&amp;#039;&amp;#039;Regen&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
– Insert an object of type Part into &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039; and name it &amp;#039;&amp;#039;&amp;#039;Base1&amp;#039;&amp;#039;&amp;#039;.  This brick will be one of the low walls to support the plane.   &lt;br /&gt;
  - Enlarge it, so it looks like a short small wall.&lt;br /&gt;
  - Change the Top Surface to &amp;quot;Smooth&amp;quot; so the plane will not stick to it.&lt;br /&gt;
  – In the properties for this part, click “Anchored” – so it won’t move.&lt;br /&gt;
&lt;br /&gt;
– Copy and paste &amp;#039;&amp;#039;&amp;#039;Base1&amp;#039;&amp;#039;&amp;#039; and rename the new brick &amp;#039;&amp;#039;&amp;#039;Base2&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
  – Drag this brick to be under the &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039; model.  &lt;br /&gt;
  – Move this brick to be next to &amp;#039;&amp;#039;&amp;#039;Base1&amp;#039;&amp;#039;&amp;#039;, remember to leave enough room for your plane to sit on top of these two walls.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Plane Model ===&lt;br /&gt;
In this section we will create the basic pieces that are needed to make a vehicle fly.  Remember, the scripts will expect the critical &amp;#039;engine&amp;#039; bricks to be named as shown in this tutorial.  If you want to change a name, you will have to change the old name in the scripts to the new name.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039;, insert a Model and name it &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; model, insert another model and name it &amp;#039;&amp;#039;&amp;#039;BodyKit&amp;#039;&amp;#039;&amp;#039;.   &amp;#039;&amp;#039;&amp;#039;BodyKit&amp;#039;&amp;#039;&amp;#039; is where you can keep all the decorative pieces of the plane, without getting mixed up with the &amp;#039;engine&amp;#039; pieces.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; model, insert another model and name it &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;.  &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039; is the model that will hold the pieces of the plane which makes it fly.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039;, insert an object of type IntValue, name it &amp;#039;&amp;#039;&amp;#039;PlaneCheck&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039;, add another IntValue, name it &amp;#039;&amp;#039;&amp;#039;Stunt&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating the Parts Model ===&lt;br /&gt;
&lt;br /&gt;
For the following section, we will add all the critical pieces to the model called &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039; model, insert object CFrameValue and name it “OriginCFrame”. &lt;br /&gt;
  - Add about 30 of them, all named the same.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;, insert object &amp;#039;&amp;#039;&amp;#039;Seat&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
  - Make sure the Front Surface of the &amp;#039;&amp;#039;&amp;#039;Seat&amp;#039;&amp;#039;&amp;#039; is facing towards the front of the plane.  You can change &amp;lt;br&amp;gt;the type of the FrontSurface property to hinge, to make sure you know which is the FrontSurface, &amp;lt;br&amp;gt;and that it is indeed pointing forward.  Return the property to smooth.&lt;br /&gt;
  - Change the property formFactor to plate - to make it thin like other seats.&lt;br /&gt;
  - Set the size to (2,0.4,2) - a small seat.  A large seat could cause your plane not to fly.&lt;br /&gt;
  - Change the TopSurface to Weld&lt;br /&gt;
  - In our example, we made the seat &amp;#039;&amp;#039;&amp;#039;Bright blue&amp;#039;&amp;#039;&amp;#039; Brick Color.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;, insert object Part and name it &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
  - Make sure the Front Surface of the Engine is facing towards the front of the plane.&lt;br /&gt;
  - Change the size of the brick to 6, 1.2, 12.&lt;br /&gt;
  - In our example, we made the engine brick &amp;#039;&amp;#039;&amp;#039;Bright red&amp;#039;&amp;#039;&amp;#039; Brick Color.&lt;br /&gt;
  - Change the Top Surface to &amp;quot;Weld&amp;quot;&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;, add a Part object and name it &amp;#039;&amp;#039;&amp;#039;Gun1&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
  - Change the Front Surface to “Hinge”.  Make sure it is facing forward.&lt;br /&gt;
  - Change the size so it is 3, 1.2, 1.&lt;br /&gt;
  - In our example, we made the guns &amp;#039;&amp;#039;&amp;#039;Black&amp;#039;&amp;#039;&amp;#039; Brick color.&lt;br /&gt;
  - Change the Back Surface to &amp;quot;Weld&amp;quot;&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;, add a Part object and name it &amp;#039;&amp;#039;&amp;#039;Gun2&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
  - Change the Front Surface to “Hinge”.  Make sure it is facing forward.&lt;br /&gt;
  - Change the size so it is 3, 1.2, 1&lt;br /&gt;
  - In our example, we made the guns &amp;#039;&amp;#039;&amp;#039;Black&amp;#039;&amp;#039;&amp;#039; Brick color.&lt;br /&gt;
  - Change the Back Surface to &amp;quot;Weld&amp;quot;&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039;, add a Part object and name it &amp;#039;&amp;#039;&amp;#039;Tip&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
  - Make sure the Front surface is pointing forward&lt;br /&gt;
  - Change the size to 2, 1.2, 2&lt;br /&gt;
  - In our example, we made the tip &amp;#039;&amp;#039;&amp;#039;Bright yellow&amp;#039;&amp;#039;&amp;#039; Brick color.&lt;br /&gt;
  - Change the Back Surface to &amp;quot;Weld&amp;quot;&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;, add an IntValue, and name it &amp;#039;&amp;#039;&amp;#039;Count&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Partspieces.png]]&lt;br /&gt;
&lt;br /&gt;
=== Putting the plane together === &lt;br /&gt;
&lt;br /&gt;
– Move the &amp;#039;&amp;#039;&amp;#039;Seat&amp;#039;&amp;#039;&amp;#039; on top of the &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
– Add the &amp;#039;&amp;#039;&amp;#039;Tip&amp;#039;&amp;#039;&amp;#039; to the front of the &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
– You can add more bricks to the sides of the &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039; to make wings.  &lt;br /&gt;
  - Make sure to place these additional bricks in the &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039; model. &lt;br /&gt;
  - Make sure the wings are welded to the engine, but don&amp;#039;t have the bottom surface set to weld.&lt;br /&gt;
&lt;br /&gt;
– Attach a gun to each wing – making sure the hinge points forward.&lt;br /&gt;
&lt;br /&gt;
– Move this &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; model to the top of the &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
&lt;br /&gt;
– Make sure the airplane is not attached or welded to the base pieces.&lt;br /&gt;
&lt;br /&gt;
- Save your work to a file.  &lt;br /&gt;
&lt;br /&gt;
- Test in Solo mode to make sure the plane hangs together in one piece!&lt;br /&gt;
&lt;br /&gt;
[[Image:BasicPlane.png]]&lt;br /&gt;
&lt;br /&gt;
=== Script to Regenerate the Plane Model === &lt;br /&gt;
If the engine brick is touched, it will regenerate the plane.&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;, add a Script.  Add this code to the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
model = script.Parent.Parent.Parent     -- Get the plane model - Engine.Parts.Plane&lt;br /&gt;
backup = model:clone()                  -- Copy the plane&lt;br /&gt;
local debounce = false&lt;br /&gt;
&lt;br /&gt;
function onTouch(part)&lt;br /&gt;
	if (part.Name == &amp;quot;Safe&amp;quot;) and (debounce == false) and (script.Parent.Count.Value == 0) then&lt;br /&gt;
		debounce = true&lt;br /&gt;
		wait(2)&lt;br /&gt;
		model = backup:clone()          -- Clone the copy of the plane&lt;br /&gt;
		model.Parent = game.Workspace   -- regens the plane?&lt;br /&gt;
		model:makeJoints()&lt;br /&gt;
		script.Parent.Count.Value = 1   &lt;br /&gt;
		debounce = false&lt;br /&gt;
	end&lt;br /&gt;
end &lt;br /&gt;
script.Parent.Touched:connect(onTouch)  -- If the engine piece is touched&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Flying Script ===&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;, insert an object BodyGyro.&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Engine&amp;#039;&amp;#039;&amp;#039;, insert an object BodyPosition.&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;StarterPack&amp;#039;&amp;#039;&amp;#039;, insert object HopperBin – name it &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; &amp;lt;b&amp;gt;HopperBin&amp;lt;/b&amp;gt; (&amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; the model called &amp;quot;Plane&amp;quot;), insert object Script, and name it &amp;#039;&amp;#039;&amp;#039;PlaneFlyer&amp;#039;&amp;#039;&amp;#039;.  Add this code to the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin=script.Parent&lt;br /&gt;
plane=nil&lt;br /&gt;
hold=false&lt;br /&gt;
local debounce = false&lt;br /&gt;
local planedebounce = false&lt;br /&gt;
local stuntdebounce = false&lt;br /&gt;
local controlling = false&lt;br /&gt;
&lt;br /&gt;
function fire(pln,spn)&lt;br /&gt;
	local missile = bin.Rocket:clone()&lt;br /&gt;
	missile.CFrame = spn.CFrame * CFrame.new(0, 0, -35)&lt;br /&gt;
&lt;br /&gt;
	missile.RocketScript.Disabled = false&lt;br /&gt;
	missile.Parent = game.Workspace&lt;br /&gt;
&lt;br /&gt;
	local creator_tag = Instance.new(&amp;quot;ObjectValue&amp;quot;)&lt;br /&gt;
	creator_tag.Value = game.Players.LocalPlayer&lt;br /&gt;
	creator_tag.Name = &amp;quot;creator&amp;quot;&lt;br /&gt;
	creator_tag.Parent = missile&lt;br /&gt;
&lt;br /&gt;
	missile.Owner.Value = pln&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function computeDirection(vec)&lt;br /&gt;
	local lenSquared = vec.magnitude * vec.magnitude&lt;br /&gt;
	local invSqrt = 1 / math.sqrt(lenSquared)&lt;br /&gt;
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function move(target, engine)&lt;br /&gt;
	local origincframe = engine:findFirstChild(&amp;quot;BodyGyro&amp;quot;).cframe&lt;br /&gt;
	local dir = (target - engine.Position).unit&lt;br /&gt;
	local spawnPos = engine.Position&lt;br /&gt;
&lt;br /&gt;
	local pos = spawnPos + (dir * 1)&lt;br /&gt;
&lt;br /&gt;
	engine:findFirstChild(&amp;quot;BodyGyro&amp;quot;).maxTorque = Vector3.new(9000, 9000, 9000)&lt;br /&gt;
	engine:findFirstChild(&amp;quot;BodyGyro&amp;quot;).cframe = CFrame.new(pos,  pos + dir)&lt;br /&gt;
	wait(0.1)&lt;br /&gt;
	engine:findFirstChild(&amp;quot;BodyGyro&amp;quot;).maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
	engine:findFirstChild(&amp;quot;BodyGyro&amp;quot;).cframe = origincframe&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function findPlane(player)&lt;br /&gt;
	local list = player.Character:GetChildren()&lt;br /&gt;
	for x = 1, #list do&lt;br /&gt;
		if (list[x].Name == &amp;quot;Plane&amp;quot;) then&lt;br /&gt;
			local weld = list[x]:FindFirstChild(&amp;quot;Parts&amp;quot;):FindFirstChild(&amp;quot;Seat&amp;quot;):FindFirstChild(&amp;quot;SeatWeld&amp;quot;)&lt;br /&gt;
			if (weld ~= nil) and (weld.Part1 == player.Character:FindFirstChild(&amp;quot;Torso&amp;quot;)) then&lt;br /&gt;
				return list[x]&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onButton1Down(mouse)&lt;br /&gt;
	local vehicle = findPlane(script.Parent.Parent.Parent)&lt;br /&gt;
	if vehicle ~= nil and debounce == false and planedebounce == false then&lt;br /&gt;
	debounce = true&lt;br /&gt;
&lt;br /&gt;
	controlling = true&lt;br /&gt;
&lt;br /&gt;
	while true do&lt;br /&gt;
		wait()&lt;br /&gt;
		local engine = vehicle.Parts.Engine&lt;br /&gt;
		local position = mouse.Hit&lt;br /&gt;
		local target = position.p&lt;br /&gt;
		if engine:findFirstChild(&amp;quot;FlyScript&amp;quot;) ~= nil then&lt;br /&gt;
		move(target, engine)&lt;br /&gt;
		end&lt;br /&gt;
		if planedebounce == true or&lt;br /&gt;
		controlling == false then break end&lt;br /&gt;
	end&lt;br /&gt;
	wait(.1)&lt;br /&gt;
	debounce = false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onButton1Up(mouse)&lt;br /&gt;
	controlling = false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onSelected(mouse)&lt;br /&gt;
	mouse.Icon = &amp;quot;rbxasset://textures\\GunCursor.png&amp;quot;&lt;br /&gt;
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)&lt;br /&gt;
	mouse.Button1Up:connect(function() onButton1Up(mouse) end)&lt;br /&gt;
	mouse.KeyDown:connect(onKeyDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onKeyDown(key)&lt;br /&gt;
	if (key~=nil) then&lt;br /&gt;
		key = key:lower()&lt;br /&gt;
		local vehicle = findPlane(script.Parent.Parent.Parent)&lt;br /&gt;
		if (vehicle==nil) then return end&lt;br /&gt;
		plane = vehicle.Parts&lt;br /&gt;
		local engine = vehicle.Parts.Engine&lt;br /&gt;
			if (key==&amp;quot;f&amp;quot;) and (bin.Reload.Value == 0) then&lt;br /&gt;
				fire(vehicle,plane.Gun1)&lt;br /&gt;
				fire(vehicle,plane.Gun2)&lt;br /&gt;
				bin.Reload.Value = 1&lt;br /&gt;
				wait(1)&lt;br /&gt;
				bin.Reload.Value = 0&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;x&amp;quot;) and planedebounce == false then&lt;br /&gt;
				local power = plane.Engine:findFirstChild(&amp;quot;FlyScript&amp;quot;)&lt;br /&gt;
				if (power ~= nil) then&lt;br /&gt;
				power:remove()&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;y&amp;quot;) then&lt;br /&gt;
				local power = plane.Engine:findFirstChild(&amp;quot;FlyScript&amp;quot;)&lt;br /&gt;
				if (power ~= nil) then return end&lt;br /&gt;
				local fly = script.FlyScript:clone()&lt;br /&gt;
				fly.Disabled = false&lt;br /&gt;
				fly.Parent = plane.Engine&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;k&amp;quot;) and planedebounce == false then&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y -0.7, 0)&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;h&amp;quot;) and planedebounce == false then&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0)&lt;br /&gt;
				wait()&lt;br /&gt;
				engine.RotVelocity = Vector3.new(0, engine.RotVelocity.y +0.7, 0)&lt;br /&gt;
			return end&lt;br /&gt;
			if (key==&amp;quot;j&amp;quot;) and planedebounce == false then&lt;br /&gt;
				local body = plane.Engine.BodyGyro&lt;br /&gt;
				body.maxTorque = Vector3.new(9000, 9000, 9000)&lt;br /&gt;
&lt;br /&gt;
				local position = engine.CFrame * Vector3.new(0, 0.5, -4)&lt;br /&gt;
				local dir = position - engine.Position&lt;br /&gt;
&lt;br /&gt;
				dir = computeDirection(dir)&lt;br /&gt;
&lt;br /&gt;
				local spawnPos = engine.Position&lt;br /&gt;
&lt;br /&gt;
				local pos = spawnPos + (dir * 8)&lt;br /&gt;
&lt;br /&gt;
				body.cframe = CFrame.new(pos,  pos + dir)&lt;br /&gt;
				wait(.2)&lt;br /&gt;
				body.maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;l&amp;quot;) and planedebounce == false then&lt;br /&gt;
				local body = plane.Engine.BodyGyro&lt;br /&gt;
				body.maxTorque = Vector3.new(9000, 0, 0)&lt;br /&gt;
				local frame = plane:FindFirstChild(&amp;quot;OriginCFrame&amp;quot;)&lt;br /&gt;
				if frame ~= nil then&lt;br /&gt;
					body.cframe = frame.Value&lt;br /&gt;
				end&lt;br /&gt;
				wait(0.1)&lt;br /&gt;
				body.maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;u&amp;quot;) and planedebounce == false then&lt;br /&gt;
				local body = plane.Engine.BodyGyro&lt;br /&gt;
				body.maxTorque = Vector3.new(9000, 9000, 9000)&lt;br /&gt;
&lt;br /&gt;
				local position = engine.CFrame * Vector3.new(0, -0.5, -4)&lt;br /&gt;
				local dir = position - engine.Position&lt;br /&gt;
&lt;br /&gt;
				dir = computeDirection(dir)&lt;br /&gt;
&lt;br /&gt;
				local spawnPos = engine.Position&lt;br /&gt;
&lt;br /&gt;
				local pos = spawnPos + (dir * 8)&lt;br /&gt;
&lt;br /&gt;
				body.cframe = CFrame.new(pos,  pos + dir)&lt;br /&gt;
				wait(.2)&lt;br /&gt;
				body.maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;g&amp;quot;) and planedebounce == false and stuntdebounce == false then&lt;br /&gt;
				planedebounce = true&lt;br /&gt;
				stuntdebounce = true&lt;br /&gt;
				plane.Parent.Stunt.Value = 1&lt;br /&gt;
				local body = plane.Engine.BodyGyro&lt;br /&gt;
				body.maxTorque = Vector3.new(9000, 9000, 9000)&lt;br /&gt;
&lt;br /&gt;
				local currentframe = plane.Engine.CFrame&lt;br /&gt;
&lt;br /&gt;
				for i = 1,6 do&lt;br /&gt;
				body.cframe = plane.Engine.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 30)&lt;br /&gt;
				wait(.2)&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				body.cframe = currentframe&lt;br /&gt;
				wait(.6)&lt;br /&gt;
&lt;br /&gt;
				body.maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
				planedebounce = false&lt;br /&gt;
				plane.Parent.Stunt.Value = 0&lt;br /&gt;
				wait(3)&lt;br /&gt;
				stuntdebounce = false&lt;br /&gt;
			end&lt;br /&gt;
			if (key==&amp;quot;t&amp;quot;) and planedebounce == false and stuntdebounce == false then&lt;br /&gt;
				planedebounce = true&lt;br /&gt;
				stuntdebounce = true&lt;br /&gt;
				plane.Parent.Stunt.Value = 1&lt;br /&gt;
				local body = plane.Engine.BodyGyro&lt;br /&gt;
				body.maxTorque = Vector3.new(9000, 9000, 9000)&lt;br /&gt;
&lt;br /&gt;
				local currentframe = plane.Engine.CFrame&lt;br /&gt;
				local valy = 30&lt;br /&gt;
				local valz = 30&lt;br /&gt;
&lt;br /&gt;
				for i = 1,8 do&lt;br /&gt;
				body.cframe = currentframe * CFrame.fromEulerAnglesXYZ(0, valy, valz)&lt;br /&gt;
				valy = valy +50&lt;br /&gt;
				valz = valz +100&lt;br /&gt;
				wait(.1)&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				body.cframe = currentframe * CFrame.fromEulerAnglesXYZ(0, 600, 0)&lt;br /&gt;
&lt;br /&gt;
				wait(.5)&lt;br /&gt;
&lt;br /&gt;
				body.maxTorque = Vector3.new(0, 0, 0)&lt;br /&gt;
				planedebounce = false&lt;br /&gt;
				plane.Parent.Stunt.Value = 0&lt;br /&gt;
				wait(4)&lt;br /&gt;
				stuntdebounce = false&lt;br /&gt;
			end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bin.Selected:connect(onSelected)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Inside PlaneFlyer, insert object Script, and name it &amp;#039;&amp;#039;&amp;#039;FlyScript&amp;#039;&amp;#039;&amp;#039;.  Make this script &amp;#039;&amp;#039;&amp;#039;Disabled&amp;#039;&amp;#039;&amp;#039;.  (The PlaneFlyer script will activate it when needed.)&lt;br /&gt;
  Add this code to it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local engine = script.Parent.Parent.Engine&lt;br /&gt;
local spd = 3&lt;br /&gt;
local position = engine.Position&lt;br /&gt;
&lt;br /&gt;
while true do&lt;br /&gt;
	wait(.1)&lt;br /&gt;
	direction = engine.CFrame.lookVector &lt;br /&gt;
	position = position + spd*3*direction&lt;br /&gt;
	error = position - engine.Position&lt;br /&gt;
	engine.Velocity = spd*error&lt;br /&gt;
	engine.RotVelocity = Vector3.new(0, 0, 0)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding Guns ===&lt;br /&gt;
This section describes what you need to do to add fire power to your plane.&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; HopperBin, insert IntValue, and name it &amp;#039;&amp;#039;&amp;#039;Reload&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; HopperBin, insert object Part, and name it &amp;#039;&amp;#039;&amp;#039;Rocket&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
   - Change the shape and size of this brick to the look you want for your bullets&lt;br /&gt;
   - For example, make it size 1x1&lt;br /&gt;
   - Change brick color to &amp;#039;&amp;#039;&amp;#039;Bright red&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
   - Change Shape to &amp;#039;&amp;#039;&amp;#039;Ball&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Rocket&amp;#039;&amp;#039;&amp;#039;, insert object Sound, name it &amp;#039;&amp;#039;&amp;#039;Explosion&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
   - Add this to &amp;#039;&amp;#039;&amp;#039;SoundID&amp;#039;&amp;#039;&amp;#039; property:  rbxasset://sounds\collide.wav&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Rocket&amp;#039;&amp;#039;&amp;#039;, insert object Sound, name it &amp;#039;&amp;#039;&amp;#039;Swoosh&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
   - Add this to &amp;#039;&amp;#039;&amp;#039;SoundID&amp;#039;&amp;#039;&amp;#039; property:  rbxasset://sounds\Rocket whoosh 01.wav&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Rocket&amp;#039;&amp;#039;&amp;#039;, insert ObjectValue, name it &amp;#039;&amp;#039;&amp;#039;Owner&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
- Inside &amp;#039;&amp;#039;&amp;#039;Rocket&amp;#039;&amp;#039;&amp;#039;, insert script, name it &amp;#039;&amp;#039;&amp;#039;RocketScript&amp;#039;&amp;#039;&amp;#039;.  Make this script &amp;#039;&amp;#039;&amp;#039;Disabled&amp;#039;&amp;#039;&amp;#039;.  The &amp;#039;&amp;#039;&amp;#039;PlaneFlyer&amp;#039;&amp;#039;&amp;#039; script will activate it when the player gets on the plane. Add this code to the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
r = game:service(&amp;quot;RunService&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
shaft = script.Parent&lt;br /&gt;
position = shaft.Position&lt;br /&gt;
&lt;br /&gt;
function fly()&lt;br /&gt;
	direction = shaft.CFrame.lookVector &lt;br /&gt;
	position = position + 35*direction&lt;br /&gt;
	error = position - shaft.Position&lt;br /&gt;
	shaft.Velocity = 5*error&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blow()&lt;br /&gt;
	swoosh:stop()&lt;br /&gt;
	explosion = Instance.new(&amp;quot;Explosion&amp;quot;)&lt;br /&gt;
	explosion.Position = shaft.Position&lt;br /&gt;
	explosion.BlastRadius = 10&lt;br /&gt;
&lt;br /&gt;
	-- find instigator tag&lt;br /&gt;
	local creator = script.Parent:findFirstChild(&amp;quot;creator&amp;quot;)&lt;br /&gt;
	if creator ~= nil then&lt;br /&gt;
		explosion.Hit:connect(function(part, distance)  onPlayerBlownUp(part, distance, creator) end)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	explosion.Parent = game.Workspace&lt;br /&gt;
	connection:disconnect()&lt;br /&gt;
	wait(.1)&lt;br /&gt;
	shaft:remove()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onTouch(hit)&lt;br /&gt;
	if hit.Name == &amp;quot;Building&amp;quot; or&lt;br /&gt;
	hit.Name == &amp;quot;Safe&amp;quot; then&lt;br /&gt;
		swoosh:stop()&lt;br /&gt;
		shaft:remove()&lt;br /&gt;
	return end&lt;br /&gt;
&lt;br /&gt;
	local parent = hit.Parent.Parent&lt;br /&gt;
	local owner = shaft.Owner&lt;br /&gt;
	if owner ~= nil then&lt;br /&gt;
		if parent ~= nil and owner.Value ~= nil then&lt;br /&gt;
			if parent ~= owner.Value then&lt;br /&gt;
				local stunt = parent:FindFirstChild(&amp;quot;Stunt&amp;quot;)&lt;br /&gt;
				if stunt ~= nil then&lt;br /&gt;
					if stunt.Value ~= 1 then&lt;br /&gt;
						blow()&lt;br /&gt;
					end&lt;br /&gt;
				else&lt;br /&gt;
					blow()&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onPlayerBlownUp(part, distance, creator)&lt;br /&gt;
	if part.Name == &amp;quot;Head&amp;quot; then&lt;br /&gt;
		local humanoid = part.Parent:findFirstChild(&amp;quot;Humanoid&amp;quot;)&lt;br /&gt;
		tagHumanoid(humanoid, creator)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function tagHumanoid(humanoid, creator)&lt;br /&gt;
	if creator ~= nil then&lt;br /&gt;
		local new_tag = creator:clone()&lt;br /&gt;
		new_tag.Parent = humanoid&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function untagHumanoid(humanoid)&lt;br /&gt;
	if humanoid ~= nil then&lt;br /&gt;
		local tag = humanoid:findFirstChild(&amp;quot;creator&amp;quot;)&lt;br /&gt;
		if tag ~= nil then&lt;br /&gt;
			tag.Parent = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
t, s = r.Stepped:wait()&lt;br /&gt;
&lt;br /&gt;
swoosh = script.Parent.Swoosh&lt;br /&gt;
swoosh:play()&lt;br /&gt;
&lt;br /&gt;
d = t + 4.0 - s&lt;br /&gt;
connection = shaft.Touched:connect(onTouch)&lt;br /&gt;
&lt;br /&gt;
while t &amp;lt; d do&lt;br /&gt;
	fly()&lt;br /&gt;
	t = r.Stepped:wait()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- at max range&lt;br /&gt;
script.Parent.Explosion.PlayOnRemove = false&lt;br /&gt;
swoosh:stop()&lt;br /&gt;
shaft:remove()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Making the Plane Explode on Impact ===&lt;br /&gt;
This script inside of the Plane model will cause the plane to explode when the &amp;#039;&amp;#039;&amp;#039;Tip&amp;#039;&amp;#039;&amp;#039; brick is touched.&lt;br /&gt;
&lt;br /&gt;
– Inside &amp;#039;&amp;#039;&amp;#039;Plane&amp;#039;&amp;#039;&amp;#039; model, insert a Script object.  Add this code into that script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
local boom = false&lt;br /&gt;
&lt;br /&gt;
function createExplosion(position)&lt;br /&gt;
&lt;br /&gt;
	explosion = Instance.new(&amp;quot;Explosion&amp;quot;)&lt;br /&gt;
	explosion.Position = position&lt;br /&gt;
	explosion.BlastRadius = 12&lt;br /&gt;
	explosion.Parent = game.Workspace&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onTouch(part)&lt;br /&gt;
&lt;br /&gt;
	if boom == true then &lt;br /&gt;
		return &lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (part.Name == &amp;quot;Rocket&amp;quot;) or (part.Name == &amp;quot;Safe&amp;quot;) or &lt;br /&gt;
		(part.Parent.Parent.Parent == script.Parent) or &lt;br /&gt;
		(part.Parent:findFirstChild(&amp;quot;Humanoid&amp;quot;)) then &lt;br /&gt;
&lt;br /&gt;
		return &lt;br /&gt;
&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (script.Parent.Parts.Tip.Velocity.x &amp;gt; 50) or &lt;br /&gt;
		(script.Parent.Parts.Tip.Velocity.x &amp;lt; -50) or &lt;br /&gt;
		(script.Parent.Parts.Tip.Velocity.z &amp;gt; 50) or &lt;br /&gt;
		(script.Parent.Parts.Tip.Velocity.z &amp;lt; -50) then&lt;br /&gt;
&lt;br /&gt;
		boom = true&lt;br /&gt;
		createExplosion(script.Parent.Parts.Engine.Position)&lt;br /&gt;
		script.Parent:BreakJoints()&lt;br /&gt;
		local stuff = script.Parent:children()&lt;br /&gt;
		for i=1,#stuff do&lt;br /&gt;
			if stuff[i].Name == &amp;quot;BodyKit&amp;quot; or&lt;br /&gt;
			stuff[i].Name == &amp;quot;Parts&amp;quot; then&lt;br /&gt;
			local parts = stuff[i]:children()&lt;br /&gt;
				for p = 1, #parts do&lt;br /&gt;
					if parts[p].className == &amp;quot;Part&amp;quot; then&lt;br /&gt;
						local velo = Instance.new(&amp;quot;BodyVelocity&amp;quot;)&lt;br /&gt;
						velo.maxForce = Vector3.new(9.9e+036, 9.9e+036, 9.9e+036)&lt;br /&gt;
						velo.velocity = Vector3.new(math.random(-15,15),&lt;br /&gt;
											math.random(-15,15),&lt;br /&gt;
											math.random(-15,15))&lt;br /&gt;
						velo.Parent = parts[p]&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		wait(4)&lt;br /&gt;
		script.Parent:remove()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
script.Parent.Parts.Tip.Touched:connect(onTouch) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regenerating the Plane ===&lt;br /&gt;
&lt;br /&gt;
This section will add the scripts which will regenerate the plane after one flies off the hangar.&lt;br /&gt;
&lt;br /&gt;
Inside &amp;#039;&amp;#039;&amp;#039;Parts&amp;#039;&amp;#039;&amp;#039; model, insert a Script.  This script checks to see if the plane is away from the hangar, and changes the regen value.  Add this code to that script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
position = script.Parent.Engine.Position&lt;br /&gt;
local object = Instance.new(&amp;quot;ObjectValue&amp;quot;)&lt;br /&gt;
object.Value = script.Parent.Parent.Parent -- Hangar model&lt;br /&gt;
&lt;br /&gt;
seat = script.Parent.Seat&lt;br /&gt;
&lt;br /&gt;
function onChildAdded(part)&lt;br /&gt;
	if part.className == &amp;quot;Weld&amp;quot; then&lt;br /&gt;
		local torso = part.Part1&lt;br /&gt;
		if torso ~= nil then&lt;br /&gt;
			local parent = torso.Parent&lt;br /&gt;
			if parent ~= nil then&lt;br /&gt;
				script.Parent.Parent.Parent = parent&lt;br /&gt;
				while true do&lt;br /&gt;
					wait(2)&lt;br /&gt;
					local pos = script.Parent.Engine.Position&lt;br /&gt;
					if (position - pos).magnitude &amp;gt; 30 then&lt;br /&gt;
						if object.Value ~= nil then&lt;br /&gt;
							object.Value.Regen.Value = 1&lt;br /&gt;
							wait(.5)&lt;br /&gt;
							object.Value.Regen.Value = 0&lt;br /&gt;
							object.Value = nil&lt;br /&gt;
						end&lt;br /&gt;
					        break &lt;br /&gt;
                                        end&lt;br /&gt;
				end&lt;br /&gt;
				while true do&lt;br /&gt;
					print(&amp;quot;Loop&amp;quot;)&lt;br /&gt;
					wait(2)&lt;br /&gt;
					if part == nil then&lt;br /&gt;
						script.Parent.Parent.Parent = game.Workspace&lt;br /&gt;
						script.Parent.Parent:MakeJoints()&lt;br /&gt;
					break end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
seat.ChildAdded:connect(onChildAdded)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
– Insert a Script object into &amp;#039;&amp;#039;&amp;#039;Hangar&amp;#039;&amp;#039;&amp;#039; model.  This script actually creates the new plane when the Regen value changes.  Add this code to the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
system = script.Parent     -- gets the Hangar model&lt;br /&gt;
model = system.Plane       -- gets the Plane model&lt;br /&gt;
backup = model:Clone()     -- creates a copy of the Plane model&lt;br /&gt;
regen = system.Regen       -- Saves the integer value stored in the Hangar&amp;#039;s Regen variable&lt;br /&gt;
&lt;br /&gt;
function checkRegen()&lt;br /&gt;
	if regen.Value == 1 then          -- Hmmm...&lt;br /&gt;
		model = backup:Clone()    -- copies the copy of the plane&lt;br /&gt;
		model.Parent = system     -- adds the plane to the hangar&lt;br /&gt;
		model:MakeJoints()        -- ensures the bricks of the plane stick together (right?)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
regen.Changed:connect(checkRegen)         -- When a plane is created, the regen value changes &lt;br /&gt;
                                          -- from nil to a value - triggering this call.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
&lt;br /&gt;
* Do not make your plane too big - or it will just wiggle on the hangar and will not fly.  This is because it gets too heavy for the Engine to carry.  Either make the plane smaller or add additional Engine parts.&lt;br /&gt;
&lt;br /&gt;
* If you want your plane to look nicer, try making all &amp;#039;&amp;#039;&amp;#039;visible&amp;#039;&amp;#039;&amp;#039; surfaces Smooth. &lt;br /&gt;
&lt;br /&gt;
* Do not place the tip at the bottom or near the bottom of the plane - or it will blow up whenever it lands.  The tip is designed as a fail-safe to keep you from getting stuck to a wall during a crash.&lt;br /&gt;
&lt;br /&gt;
=== Airplane platforms and Hangars ===&lt;br /&gt;
&lt;br /&gt;
Here are some samples of more advanced hangars:&lt;br /&gt;
&lt;br /&gt;
[[Image:PlaneTutorial1.png]]&lt;br /&gt;
&lt;br /&gt;
== Additional Options ==&lt;br /&gt;
&lt;br /&gt;
=== Bullet Distance ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	missile.CFrame = spn.CFrame * CFrame.new(0, 0, -35)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the &amp;#039;&amp;#039;&amp;#039;PlaneFlyer&amp;#039;&amp;#039;&amp;#039; script, you can change the -35 to another number. This will make the bullet appear a different distance from the plane when you fire. You can also change the 0s to offset the bullet from the gun it comes out of. Do not change the -35 to a number too close to (or above) 0, or the plane will run into the bullets and die.&lt;br /&gt;
&lt;br /&gt;
=== Renaming the Plane Model ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function findPlane(player)&lt;br /&gt;
	local list = player.Character:GetChildren()&lt;br /&gt;
	for x = 1, #list do&lt;br /&gt;
		if (list[x].Name == &amp;quot;Plane&amp;quot;) then&lt;br /&gt;
			local weld = list[x]:FindFirstChild(&amp;quot;Parts&amp;quot;):FindFirstChild(&amp;quot;Seat&amp;quot;):FindFirstChild(&amp;quot;SeatWeld&amp;quot;)&lt;br /&gt;
			if (weld ~= nil) and (weld.Part1 == player.Character:FindFirstChild(&amp;quot;Torso&amp;quot;)) then&lt;br /&gt;
				return list[x]&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This part of the &amp;#039;&amp;#039;&amp;#039;PlaneFlyer&amp;#039;&amp;#039;&amp;#039; script will find the plane you are controlling when you do something in the plane. If you renamed your plane model, change the word &amp;quot;Plane&amp;quot; on the following line to what you named your model.  This is in the PlaneFlyer script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
		if (list[x].Name == &amp;quot;Plane&amp;quot;) then&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Guns ===&lt;br /&gt;
&lt;br /&gt;
If your plane has more than 2 guns, change the &amp;#039;&amp;#039;&amp;#039;PlaneFlyer&amp;#039;&amp;#039;&amp;#039; script as follows:&lt;br /&gt;
&lt;br /&gt;
Copy the fire function so that you have as many as you have guns on your plane. For example, my plane has -six- guns, so I will do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
			if (key==&amp;quot;f&amp;quot;) and (bin.Reload.Value == 0) then&lt;br /&gt;
				fire(vehicle,plane.Gun1)&lt;br /&gt;
				fire(vehicle,plane.Gun2)&lt;br /&gt;
				fire(vehicle,plane.Gun3)&lt;br /&gt;
				fire(vehicle,plane.Gun4)&lt;br /&gt;
				fire(vehicle,plane.Gun5)&lt;br /&gt;
				fire(vehicle,plane.Gun6)&lt;br /&gt;
				bin.Reload.Value = 1&lt;br /&gt;
				wait(1)&lt;br /&gt;
				bin.Reload.Value = 0&lt;br /&gt;
			end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the six lines in the script corresponding to the six guns.&lt;br /&gt;
&lt;br /&gt;
You can also change the &amp;#039;&amp;#039;wait(1)&amp;#039;&amp;#039; to another number if you want to be able to fire more rapidly, or more slowly (a wait of 0.5 means you can fire every half second, a wait of 2 means every 2 seconds)&lt;br /&gt;
&lt;br /&gt;
And now for the stunt script sections.  On both, the last line (before the &amp;#039;&amp;#039;end&amp;#039;&amp;#039;) is &amp;#039;&amp;#039;stuntdebounce = false&amp;#039;&amp;#039;.  Before that line is a wait line. You can change this number if you want the plane to be able to do tricks more or less frequently. If you don&amp;#039;t want your plane to have stunts, delete these lines. You can make the stunts operate more quickly or more slowly by changing the other waits (good if you have a big plane that turns slowly, and at the default speed will not complete the stunt properly).&lt;br /&gt;
&lt;br /&gt;
=== Speed of the plane ===&lt;br /&gt;
&lt;br /&gt;
In the &amp;#039;&amp;#039;&amp;#039;FlyScript&amp;#039;&amp;#039;&amp;#039;, you can change the line &amp;#039;&amp;#039;local spd = 3&amp;#039;&amp;#039;. You can change 3 to another number to make the plane fly faster or more slowly. A speed of 1.5 is half as fast as 3. If you don&amp;#039;t know what to put, you can leave it at 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reference page for Airplane Scripts ===&lt;br /&gt;
&lt;br /&gt;
The following links will show you the specific scripts for the different features of an airplane.&lt;br /&gt;
  &lt;br /&gt;
[[How_to_Make_a_Plane/scripts#Plane_explosion|This script]] goes in the plane itself, and makes your plane explode when it hits something.  If you want you can change the blast radius.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[How_to_Make_a_Plane/scripts#Plane_regeneration|This script]] goes in the plane&amp;#039;s Parts and makes your plane regenerate when it leaves the hangar and is going at a certain speed.&lt;br /&gt;
&lt;br /&gt;
Do not delete this script. It also makes it so you can control the plane when you sit down.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[How to Make a Plane/scripts#Engine|This script]] goes in the engine.  This makes the plane regenerate when its Engine touches an object named Safe. This is usually a glass wall that does not collide and is placed in front of the plane hangars and deletes rockets that touch it.&lt;br /&gt;
&lt;br /&gt;
If you are using the Safe objects to prevent hangar killings, use this script. Otherwise you should delete this. If you do not want autoregenerate, delete this script. (Useful if you have a really powerful plane that you want available only once every so often).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Go to the script in the platforms that your plane will be on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
system = script.Parent&lt;br /&gt;
model = system.Plane&lt;br /&gt;
backup = model:Clone()&lt;br /&gt;
regen = system.Regen&lt;br /&gt;
&lt;br /&gt;
function checkRegen()&lt;br /&gt;
	if regen.Value == 1 then&lt;br /&gt;
		model = backup:Clone()&lt;br /&gt;
		model.Parent = system&lt;br /&gt;
		model:MakeJoints()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
regen.Changed:connect(checkRegen)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete this script if you are using the Safe blocks to prevent hangar killings, or if you do not want auto regenerate. Otherwise use it. Do the same for the script in the other station (it is exactly the same).&lt;br /&gt;
&lt;br /&gt;
In the line &amp;#039;&amp;#039;model = system.Plane&amp;#039;&amp;#039;. change &amp;quot;Plane&amp;quot; to the name of your plane.&lt;br /&gt;
&lt;br /&gt;
== Optional Features ==&lt;br /&gt;
&amp;lt;i&amp;gt;See Main Article: [[How to Make a Plane/Optional Features]]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that the basics of your plane are over, if you&amp;#039;re one of those people that want your plane to bomb, cloak itself, and do other awesome things see the [[How to Make a Plane/Optional Features|Optional Features Page]].&lt;br /&gt;
&lt;br /&gt;
You can add the following features:&lt;br /&gt;
&lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Bombing|Bombing]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Shot Formations|Shot Formations]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Cloaking|Cloaking]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Boosting|Boosting]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Exhaust|Exhaust]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Landing Gear|Landing Gear]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Rockets Exaust|Rockets with Exhaust]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Balefire Attack With Planes|Balefire Attack]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Homing Missiles|Adding Homing Missiles]]&lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Bullets|Adding Bullets]]&lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Speed|Adjusting Speed]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Sequential Firing|Adding Sequential Fire]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Tool Giver Plane|Making a Plane that gives tools]] &lt;br /&gt;
*[[How_to_Make_a_Plane/Optional_Features#Team Coloring Plane|Making your Plane change your team]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting/FAQ ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;When I step onto the seat, he sticks on it but stays standing up for some reason. How do I fix this?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*A part of your plane is anchored, or joined to something it shouldn&amp;#039;t be.  Check that no parts of your plane are anchored, and that no parts are joined to anything not part of the plane (i.e., the ground, the plane platform, etc.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;My plane won&amp;#039;t work!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Follow the instructions carefully.&amp;lt;br&amp;gt;&lt;br /&gt;
*Check spelling and case-sensitivity.&amp;lt;br&amp;gt;&lt;br /&gt;
*Make sure no bricks are anchored on your plane.&amp;lt;br&amp;gt;&lt;br /&gt;
*Check the scripts and the tool.&amp;lt;br&amp;gt;&lt;br /&gt;
*Check the plane, its parts and scripts against a working model.&amp;lt;br&amp;gt;&lt;br /&gt;
*Verify the RocketScript and FlyScript are disabled.&amp;lt;br&amp;gt;&lt;br /&gt;
*Make sure the Engine brick is big enough, or the plane small enough.&amp;lt;br&amp;gt;&lt;br /&gt;
*Verify that the seat size is (2,0.4,2) - a larger seat has caused some planes not to fly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
*[[How to Make a Plane/scripts|Plane Scripts]]&lt;br /&gt;
*[[How to Make a Plane/Optional Features]]&lt;br /&gt;
*[[Part]]&lt;br /&gt;
*[[Script]]&lt;br /&gt;
*[[CFrame]]&lt;br /&gt;
*[[Model]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Player Created]]&lt;br /&gt;
[[Category:Building Tutorials]]&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;br /&gt;
[[Category:Vehicles]]&lt;/div&gt;</summary>
		<author><name>PRG</name></author>
	</entry>
</feed>