This is a partial part of a script that selects a map randomly, says the map name, and spawns everyone there. It is a copy of a script I have in another game. For some reason I keep getting the same message "Spawn is not a property of Model" (line 18) I have a few Parts in a Model named Spawns(Via the spawns), thatModel is in another Model named Test(Via the map) with parts of the map inside that. So it sort of looks like game.Lighting.Minigames.Test.Spawns.Part
minigames = game.Lighting.Minigames:GetChildren()
if game.Players.NumPlayers > 1 then
for _,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.Ament.TextLabel.Text = "Choosing Game..."
end
wait(3)
ranGame = math.random(1, #minigames)
gameChosen = minigames[ranGame]
for _,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.Ament.TextLabel.Text = "Minigame Chosen: " .. gameChosen.Name
end
wait(3)
gameChosenClone = gameChosen:Clone()
gameChosenClone.Parent = game.Workspace
wait(3)
--Spawning
spawns = gameChosenClone.Spawns:GetChildren()
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawns[i].Position)
end
end
end
end
