elseif args[1] == "SetCamera" then
if args[3] == true then
local camera = workspace.CurrentCamera
camera.CameraSubject = Player.Character.Humanoid
camera.CameraType = Enum.CameraType.Custom
camera.CFrame = Player.Character.Head.CFrame
elseif args[3] == false then
local camera = workspace.CurrentCamera
camera.CameraSubject = args[2]
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = args[2].CFrame
end
Unless i is the name of a part inside Spawns then you just need a :GetChildren() which returns a array.
Indexing instances without :GetChildren() requires their name since Instances with children have dictionaries with their names as keys.