Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Teleporting a group of players to a certain game? [closed]

Asked by 5 years ago
Edited 5 years ago

So I am working on a Camping genre game, I have made the lobby part but now the problem I am facing is teleporting them (like 8 players). I can't get my head around this. Is there any way to do so? Thanks!

0
always add a script since this is not a request site but a help site Gameplayer365247v2 1055 — 5y
0
@Gameplayer365247v2 This is not a request. These types of questions are allowed, the OP is asking how to go about solving a problem. Please stop incorrectly flagging posts. Psudar 882 — 5y
0
@Psudar You can look the answer up by just typing the question into a search engine. hiimgoodpack 2009 — 5y

Closed as Not Constructive by Gameplayer365247v2, Nowaha, Psudar, namespace25, hiimgoodpack, and MachoPiggies

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
megukoo 877 Moderation Voter
5 years ago

You can use TeleportService:TeleportPartyAsync to teleport a group of players to a place within the same game.

Example of this in use:

local teleportService = game:GetService("TeleportService")
local players = game:GetService("Players")
local placeId -- your placeId.

-- TeleportService:TeleportPartyAsync(int64 placeId, Objects players, Variant teleportData, Instance customLoadingScreen)
-- Objects should be an array of players in our case (looking like {player1, player2, player3}.)

local playerList = players:GetChildren() -- these are all the players in the server into an array.
teleportService:TeleportPartyAsync(placeId, playerList)

As for getting your playerList to teleport, you can go about that many different ways. Try figuring out what works best for your system.

2
Pro Tip: Use `Players:GetPlayers()` rather than `Players:GetChildren()` EpicMetatableMoment 1444 — 5y
Ad