Makes the map but does not teleport players to the map D: Please Help! There Is no Error in output 0_0
local roundTime = 60 * 5
local intermissionTime = 20
local serverstorage = game:GetService("ServerStorage")
local replicatedstorage = game:GetService("ReplicatedStorage")
local debris = game:GetService("Debris")
local remoteEvent = replicatedstorage:WaitForChild("RemoteEvent")
local maps = serverstorage:WaitForChild("Maps")
local mapHolder = game.Workspace:WaitForChild("MapHolder")
local allMaps = maps:GetChildren()
local newMap = allMaps[math.random(1, #allMaps)]:Clone()
local player = game.Players:GetChildren()
local spawns = newMap:WaitForChild("Spawns"):GetChildren()
for _, player in pairs[contestants] do
if player and player.Character and #spawns > 0 then
torso = player.Character:WaitForChild("Torso")
local spawnedIndex = math.random(1, #spawns)
local spawn = spawns[spawnIndex]
if spawn and torso then
table.remove(spawns, spawnIndex)
torso.CFrame = CFrame.new(spawn.Position + Vector3.new(0,3,0))
local matchtag = Instance.new("StringValue")
matchtag.Name = "MatchTag"
matchtag.Parent = player.Character
local backpack = player:FindFirstChild("BackPack")
if backpack then
if player == bloxxer then
local sword = serverstorage:WaitForChild("Sword"):Clone()
sword.Parent = backpack
elseif player == sherif then
local netgun = serverstorage:WaitForChild("Gun"):Clone()
end
end
end
end
end

1 comment
Didnt work :/