Teleport two players to a random point. Board game

Hello. I want to make a game like Twenty One. In general, I need two players who are on the server to teleport. The problem is that I don’t understand how to make the script receive these players, and then teleport them to different places.
I searched the whole Internet but I didn’t find anything.

1 Like

Do you have the places to where they can teleport all under a single folder? Make sure that they are all small parts to which players can easily teleport to. Once you do that, you can iterate through the player list generated by game.Players:GetPlayers() using a for loop, then make the spawn list by using GetChildren() on the folder, then get a random spawn using math.random(1, #(name of player list)), find that spawn using the list, teleport the player to that spawn using Humanoid:MoveTo(Spawn.Position), then remove that spawn from the spawn list. This should teleport all of the players in the server to a random spawn location from your predefined spawn list.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.