local status = game.ReplicatedStorage:FindFirstChild("statustext") --References status as "statustext" from replicated storage
local Maps = game.ReplicatedStorage.Maps:GetChildren() -- Grabs all of the maps inside the folder, since we're using GetChildren.
while true do -- Creates a loop
for i = 1,20 do -- What we are doing is, 'i' will equal to 1, then count up to 20, it will add 1 to 'i' after each round of code inside the for loop.
status.Value = "Intermission: "..20-i -- We're making a timer from 20 seconds down to 0.
wait(1) -- We wait 1 second before we go again
end -- you should know.
local rand = math.random(1, #Maps) -- we assume that there is 1 map, and we'll randomize the maps.
local map = Maps[rand]:Clone() --c clones a map of itself that is chosen
map.Parent = workspace -- Changes the parent of the map itself to workspace.
status.Value = "Map Loaded: "..map.Name -- We're making a string saying that the game loaded.
wait(5) -- We wait 5 seconds before we go to the next script
local players = game.Players:GetChildren() -- We get players.
for i = 1,#players do -- Makes a for loop using players so that we can teleport them.
if players[i].Character ~= nil then -- Checks if the player is not a character
local spawnLocation = math.random(1,#workspace.Teleports:GetChildren()) -- Grabs all of the teleport points
players[i].Character:MoveTo(workspace.Teleports:GetChildren()[spawnLocation].Position) -- Teleports all the players to a random part depending on how much you put.
end -- you should know.
end -- you should know.
end -- you should know.
^^ The current code that I find the error in.
19:29:51.122 - Teleports is not a valid member of Workspace
I'm not sure why I can't teleport players because when I testplay the game, teleport model is gone and it will consider that error, I dont know how to fix this, can anyone help me? Somebody is having the same issue and they tried cloning it, and it doesn't seem to work.

1 comment
Which line?