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

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

Asked by 3 years ago

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!

0
Try this: epic_hen9 27 — 3y
0
Oops, sorry this was the wrong question epic_hen9 27 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

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

0
Where accept button?! The_Saver31 260 — 3y
0
ow there it is The_Saver31 260 — 3y
Ad

Answer this question