Insert Service Issues / Help Needed

  1. Trying to make a working aircraft / ground crew spawner.

  2. Keep getting errors. [I will post below]

Script:

local ev = game.ReplicatedStorage.spawnRE



local InsertService = game:GetService("InsertService")

ev.OnServerEvent:Connect(function(Item)
	local veh = Item.Name
	
	local assetId  = 0
		
	if	veh == "E190" then
		 assetId = 7215979495 
	end
	
	if veh == "Q400" then
		 assetId = 6423195550

	end
	
	if veh == "A320" then
		 assetId = 6912731329

	end
	
	if veh == "737-800" then
		 assetId = 7221443338
	end
	
	
	
	--ground
	
	if veh == "Air Stairs" then
		 assetId = 6852719792
	end
	
	if veh == "Catering Truck" then
		 assetId = 0
	end
	

	if veh == "Fire Truck" then
		 assetId = 7631881585
	end
	

	if veh == "GPU (Tug and GPU)" then
		 assetId = 0
	end
	

	if veh == "Pushback Tug (The first)" then
		 assetId = 6357838444
	end
	

	if veh == "Pushback Tug (The second)" then
		 assetId = 4743451638
	end
	
	wait(0.2)
	local model = InsertService:LoadAsset(assetId)
	
	
	local pads = workspace.SpawnPads:GetChildren()
	local spwn = pads[math.random(1, #pads)].PrimaryPart.CFrame
	model.Parent = spwn
end)

We thank you for your help here at Qantas

Assets can be only loaded if the game owner(the actual owner, not even team create members) owns the model or has it in their inventory. Also you should just put the models you want to insert in a folder to not have to grab them from the server every time.

1 Like

The group owns the models and its a group game…