Telelporting players to other place into private server

When I use this script, it reserves new server, in the lobby place not in the gameplay place.

You need to change when you’re script is fired then.

Annotation%202019-08-23%20194321

Basically I want to teleport players from Amount Beater to Amount Beater Arena and then I want to reserve server, but when reserves then teleports players to reserved one, and this is like infinite loop

Can’t you simply have the script replicate to each new place created ?

What do you mean by this?

How I supposed to replicate script to another place?

1 Like

I’m not very good at this I’m gonna go ask around on the discord server see if anyone can help you.

I want like in Tower Defense Simulator game, you never get teleported to another place to already running server.

1 Like

This is the method you’re looking for.

Whenever I use TeleportService in studio i get 403 errors. TeleportService will only work in live games, and not studio.

image

Can you give some context to the error? Just showing me an error tells me very little about your problem.

		local TS = game:GetService("TeleportService")
		local Players = game:GetService("Players")

		local code = TS:ReserveServer(3518496627)
		
		local List = nil
		for i, v in pairs(WaitingPlayers) do
			table.insert(List, game.Players[WaitingPlayers[i]])
		end
		local players = List

		TS:TeleportToPrivateServer(3518496627, code, players)

This would work better.

local TeleportService = game:GetService"TeleportService"
local Players = game:GetService"Players"
local code = TeleportService:ReserveServer(3518496627)
local players = {}
for _,v in pairs(WaitingPlayers) do -- is this table is an array, simply set players to WaitingPlayers and remove this for loop
    table.insert(players,v)
end
TeleportService:TeleportToPrivateServer(3518496627,code,players)
5 Likes

Let me try, I forgot that I could not put List as nil

i have a elevator here, i want to make it when it go down and teleport into private server,
theres a elevator part that going down, i want to make it like, make the code see the part have how many players and make them for a pairs to teleport togethers.
im new to coding, can anyone help pls?