So, I have a script where I want to teleport the players to a reserved server but only the ones that have 'Queue' as the value in their Status (Which is in their Player).

This is what I have so far:

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")

local code = TS:ReserveServer(game.PlaceId)
for i,v in pairs(game.Players:GetChildren())do
	if v:FindFirstChild("Status").Status.Value == "Queue" then
		
		local players = --(Where I need the code for the specific players.)
		TS:TeleportToPrivateServer(game.PlaceId,code,players)
	end

2 comments

0

Why does it say if v:FindFirstChild(“Status”).Status.Value == “Queue” then, it should be if v:FindFirstChild(“Status”).Value == “Queue”

0

The player has a folder called status and a value inside of that folder called status too