I made a script that's supposed to teleport players to a location AFTER there are at least two players in the server. The script is a local script inside StarterPack. The code is below.
if #Players:GetChildren() <2 then
local m = Instance.new("Message", game.Workspace)
m.Text = "There must be 2 or more players in the server."
if #game.Players:GetPlayers() >=2 then
m:Destroy()
end
end
repeat wait() until #game.Players:GetPlayers() >2
target = CFrame.new(0, 5, -100) --could be near a brick or in a new area
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
--add an offset of 5 for each character
end
While the server is waiting for the # of players to be >= 2, a message is supposed to be displayed across the screen. The message won't appear, and I'm not sure what to do. Any help is appreciated.
