Automated Airport

Finally did it. There’s a plan to build a small game around this too, but that’s a “secret.” (i.e. as long as my semester continues to be so freakin’ easy. [I left ROBLOX due to school load])

There’s also automated NPC’s getting tickets, going through security, going to their gate, and boarding the planes. But that’s not featured here.

BTW: The planes don’t yield for each other if they are going into a head-on collision b/c there’s no alternative route. They only yield if they alone are about to hit. It’s a simple check: “Am I about to hit you? If so, check if you are about to hit me. If not, only I will hit you, thus I’ll stop and wait.”

Fun Fact: The planes are moved completely by CFrame. Not SetPrimaryPartCFrame, because that yields errors after a while. I basically tried to mimic BodyVelocity and BodyGyro as best I could. I couldn’t use standard physics b/c they were getting laggy due to the NPCs taking physics priority or something.


This is only true if your parts are anchored and disjointed. If you’re updating them using CFrame then you must have them welded together, so SetPrimaryPartCFrame inaccuracy wouldn’t affect your planes. Unless you’re setting the CFrame of every part on the plane individually.

1 Like

My problem with that is that I didn’t want them unanchored. I tried originally by unanchoring and welding all but the primary, but that didn’t work either. Since I want to keep them all anchored, I kinda had to do what I did. Plus it was more fun this way :slight_smile: It’s performing just fine.

Here’s what I’m doing for that:

local function GetParts(model)
	local parts = {}
	local primary = model.PrimaryPart
	local primaryCfInv = primary.CFrame:inverse()
	local function Scan(parent)
		for _,v in pairs(parent:GetChildren()) do
			if (v:IsA("BasePart") and v ~= primary) then
				table.insert(parts, {v, primaryCfInv * v.CFrame})
	return parts

local function SetModelCFrame(primary, parts, numParts, cf)
	local p
	primary.CFrame = cf
	for i = 1,numParts do
		p = parts[i]
		p[1].CFrame = cf * p[2]
-- In heartbeat:
SetModelCFrame(primary, partsFromGetPartsFunc, numParts, desiredCFrame)

Automation is so cool. I don’t care if it’s a self driving car or a virtual airport. It’s always impressive and mesmerizing to watch.


This is really cool. I wanted to do an “Automated ATC” at one point so if you dig deep in my audio you’ll find audio uploads for 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,1000,feet,etc but unfortunately I never finished it.

Also cool to have you back!


Nice - would you care to explain how your NPCs are doing pathing? Just a node graph? I’m doing something similar and am just curious about how others handle it

I know that this is a very old topic, but still, to this day I think it’s really remarkable what you’ve done with the automation here. I have tried multiple times to create something similar and haven’t been able to create it, and seeing this is just really mesmerising and inspiring, great job! (even if it’s 3 years later)


wait this was three years ago? roblox was already that good three years ago?

1 Like