Teleport Place Script

Hi, I need help, how do you make a script in which all the players teleport to a place ?

2 Likes

Can you please give us some code to build off of?

local rStorage = game:GetService("ReplicatedStorage")
local configs = rStorage:WaitForChild("Configs")

while true do
	repeat
	local timer = 10
	repeat wait()
	configs.Status.Value = "Intermission: ".. timer
		
	wait(1)
	timer = timer - 1
	until configs.Status.Value == "Intermission: 0"
	timer = 0
	until configs.Status.Value == "Intermission: 0"
	configs.Status.Value = "Loading... "
	--Teleport all players to a place
	wait(5)
end
1 Like

Use this : TeleportService | Documentation - Roblox Creator Hub

you could all teleport them with a script in fesans a loop or by creating an event call by the server which tp (RemoteEvent)

I have this problem with my script :
Output : Must be passed an array of players

That means you need to pass it an array of the players you want to teleport. Seems like a fairly straightforward error message.

3 Likes

Here ya go!

try to use:

local rStorage = game:GetService("ReplicatedStorage")
local configs = rStorage:WaitForChild("Configs")

while true do
	repeat
	local timer = 10
	repeat wait()
	configs.Status.Value = "Intermission: ".. timer
		
	wait(1)
	timer = timer - 1
	until configs.Status.Value == "Intermission: 0"
	timer = 0
	until configs.Status.Value == "Intermission: 0"
	configs.Status.Value = "Loading... "
	--Teleport all players to a place
	wait(5)
local id = "" --- your id here
local players = game:GetPlayers()
local TpService = game:GetService("TeleportService")
TpService:Teleport(id,players)
end

Also if you want custom teleport gui, you can use:

local rStorage = game:GetService("ReplicatedStorage")
local configs = rStorage:WaitForChild("Configs")
local loadGUI = rStorage:FindFirstChild("loadGUI") -- you could swap this ScreenGUI

while true do
	repeat
	local timer = 10
	repeat wait()
	configs.Status.Value = "Intermission: ".. timer
		
	wait(1)
	timer = timer - 1
	until configs.Status.Value == "Intermission: 0"
	timer = 0
	until configs.Status.Value == "Intermission: 0"
	configs.Status.Value = "Loading... "
	--Teleport all players to a place
	wait(5)
local id = "" --- your id here
local players = game:GetPlayers()
local TpService = game:GetService("TeleportService")
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
loadGUI.Parent = playerGUI
TpService:SetTeleportGui(loadGUI)

TpService:Teleport(id,players)
end
1 Like

That won’t work either, :Teleport takes arguments of (id, array) not (array, id). Just swap players, id to id, players in the teleport function.

2 Likes

Uh, I’m totally confused right now.

TeleportService.Teleport is a function. You call it with specific arguments. The arguments it’s asking for is the id of the place you want to teleport to, and a list of people to teleport. SupremeDev_1 didn’t read the wiki page, he just guessed what the function was asking for. He got it wrong, so his code won’t work. It should be TeleportService:Teleport(theIdOfThePlaceYoureTeleportingTo, aListOfPlayersBeingTeleported), but he gave those arguments in the opposite order, which won’t work.

3 Likes

In this case I would suggest you using a private server, by using :TeleportPrivateServer(gameId, player/players).

Find out more here: Link

Problem :
TeleportPrivateServer is not a valid member of TeleportService

Again? Teleport Place Script - #7 by SupremeDev_1
I’ve edited the post.

You’re all confusing me! I’m having a lot of trouble with my script right now! I just want all the players on the server to go to a place

What the heck?

Why is no one telling this guy to go use TeleportService:TeleportPartyAsync(placeId, players)?

Also, no. Teleport() can only teleport 1 PLAYER, not 2, not 3, just 1.