Hello devforum!
Me and my brother have recently been working on a story-style game like camping and I want players to teleport to another place when there is enough players. The only problem is I have one concern and that is that the players may not be teleported to the same place or if a game is not full they may join one that is already in progress. Is there a way of keeping this from happening or is this not a problem?
There is a folder inside the model with all the players in it. I also have a value with the place id in it, that is what PlaceId is.
Here is the teleportation part of the script I have so far:
local TS = game:GetService("TeleportService")
local plrs = script.Parent.Players:GetChildren()
for i, plr in pairs(plrs) do
TS:Teleport(script.Parent.PlaceId.Value, game.Players:FindFirstChild(plr.Name))
plr:Destroy()
end