I'm Trying everything but players won't teleport To an AvaiableSpawn

local s = script.Stat
-------------------- Player Join/Leave----------------------
local Players = game:GetService("Players")
local PlayerCount = 0


game.Players.PlayerAdded:Connect(function()
	PlayerCount = PlayerCount + 1
end)

game.Players.PlayerRemoving:Connect(function()
	PlayerCount = PlayerCount - 1
end)
---------Intermission------------------------
wait(1)
t = 0
while true do
	t = 5
	repeat
		t = t-1
		s.Value = "Teleporting To Game in "..t
		wait(1)
	until t == 0
local Maps = {'Yellow','Red'}
local mapChosen = math.random(1, #Maps)

for i,v in pairs(Maps) do


local storage = game:GetService("ReplicatedStorage")
local map = storage.Maps:WaitForChild(v):clone()
map.Parent = workspace.mapsInGame


------------- If Yellow Map Chosed-------------------------------------------------

	local AbleSpawnY = {'Part1','Part2','Part3','Part4','Part5','Part6','Part7','Part8','Part9'}
	local randomspawny = math.random(1, #AbleSpawnY)
		local player = game.Players:GetPlayers()
		for i = 1, #player do
			player[i].Character:MoveTo(AbleSpawnY)
			end

t= 20
	
	

	
-------------------------	
	
repeat
	t= t-1
	s.Value = t.." Seconds Left To Match Colors"
wait(1)
until t ==0
workspace.mapsInGame:ClearAllChildren()
end
end


2 comments

0

In line 41 you are moving the players to strings, not the spawn locations.

0

So How Do I Teleport Them To Spawn Locations?