local Board = script.Parent.Board
local HitBox = script.Parent.HitBox
local Debounce = true
local TimerGui = script.Parent.Board.Timer.Gui
local TimeRem = 200
local PlayerCount = script.Parent.PlayerValue
local PlayerCountGui = script.Parent.Board.PlayerCount.Gui
HitBox.Touched:Connect(function(hit)
if Board.Gui:FindFirstChild(hit.Parent.Name) then
return
else
if PlayerCount.Value < 8 then
local Newplayer = Instance.new("TextLabel")
Newplayer.Parent = Board.Gui
Newplayer.Size = UDim2.new(1,0 , 0.2,0)
Newplayer.Text = hit.Parent.Name
Newplayer.BackgroundTransparency = 1
Newplayer.Font = Enum.Font.SourceSansBold
Newplayer.TextScaled = true
Newplayer.Name = hit.Parent.Name
Debounce = false
PlayerCount.Value = PlayerCount.Value + 1
else if PlayerCount.Value >= 8 then
warn("Raid Is Full")
end
end
end
end)
while true do
for i = 1,200 do
wait(1)
TimerGui.Timer.Text = ("Time remaining: "..TimeRem)
TimeRem = TimeRem - 1
end
print("Timer is over")
local TeleportService = game:GetService("TeleportService")
local Reserve = TeleportService:ReserveServer(4834488812)
local Players = Board.Gui:GetChildren()
TeleportService:TeleportToPrivateServer(4834488812, Reserve, Players)
end
The're need to be a array of players So i tried doing that The arange of players needs to be the text labels name for the players to teleport to a reserved server

4 comments
This is exactly what im trying to do at the moment
Well, the teleporting part.
shouldnt you instead loop through players and send them one by one using teleportservice? i dont know if teleportservice accepts arrays
:TeleportToPrivateServer() is required when transferring Player Objects to a reserved Server. TeleportToPrivateService's third argument consists of an array** of the Client(s) to transport.