I'm trying to make a TeleportService utilizing TeleportPartyAsync to teleport a certain group of people, how would I do so?

So I first looked on the ROBLOX WIki, there was not much of use for me, and once I actually get all this down, how would I activate this TeleportService, do I activate it like an event?

local Team = game.Teams.TeleportingTeam
local TeleportService = game:GetService("TeleportService")
local PlaceID = 0 (Can be any game)
local PlayerList = Team:GetPlayers()
local success, result = pcall(function()
	return TeleportService:TeleportPartyAsync(PlaceID,PlayerList)
end)

if success then
	local JobID = result
else
	warn(result)
end

4 comments

0

When do you want the event to fire? A command, would it fire from the client or the server ?

0

I seeing how to fire the TeleportService and to see if it fires like an event

0

You could create a Remote Event, and use .OnServerEvent to fire the teleport.

0

Can you give me a example of that? Please, and thank you.