Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Make Camping Game Teleport [Lobby -> Game]?

Hey There,

So i want to make a simple camping type game

But i still confused about

How you teleport player to another place?

Like, if the game already running nobody can join it.

And i also found this,

TeleportService = game:GetService("TeleportService")
GamePlaceId = 12345

function StartGameServerWithGroup(players)
    local accessCode, serverId = TeleportService:ReserveServer(GamePlaceId)
    
    TeleportService:TeleportToPrivateServer(GamePlaceId, accessCode, players)
end

StartGameServerWithGroup({game.Players.pro_developer213})

Source: https://devforum.roblox.com/t/how-does-camping-create-new-servers/397228/6

But i dont know how it work ;-;


Please Help If You Can!

Thank's for Reading!

2 comments

0

Try this:

0

Oops, sorry this was the wrong question

1 answer

✓ Accepted answer

So if you're trying to create a private server then insert this script.

local PlaceId = nil -- Replace with the game's id
local TeleportService = game:GetService("TeleportService")
local Code = TeleportService:ReserveServer(PlaceId)
TeleportService:TeleportToPrivateServer(PlaceId, Code, game.Players:players())

I didn't test this out

2 comments

0

Where accept button?!

0

ow there it is

This discussion is preserved as it was. New answers, comments, and votes are closed.