You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I an trying to make a game similar to story games where there is a lobby and players
get sent to a place where the real game begins.
- What is the issue? Include screenshots / videos if possible!
There are multiple types of private servers(1 player, 3 players, 5 and 10) and for the game
to begin, I want to make sure that atleast half of the people sent have loaded. However, I don’t
know how to send the value of the amount of players from the lobby to the main game.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
On all the solutions I found to wait for everyone to load, they were assuming the amount of players is always the same.
The only thing I can think of is to make multiple places.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- Script where the player is sent
local count = 30
local function CountAndTeleport()
if countDebounce == false then
countDebounce = true
repeat
task.wait(1)
count -= 1
CountDown.SurfaceGui.TextLabel.Text = tostring(count)
until count == 0 or #Table == 0
local Code = tpService:ReserveServer(id)
--Where I am trying to send the amount of players in the table to the place
tpService:TeleportToPrivateServer(id, code, Table)
countDebounce = false
count = 30
Countdown.SurfaceGui.TextLabel.Text = count
end
end
Trigger.Touched:Connect(CountAndTeleport)
Trigger.Touched:Connect(addToTable)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.