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

How to lock a place after all players have been teleported?

In camping u have this car wich teleportes u to a place , After everyone joined the place gets locked and no one can join anymore

can someone send me links so i can learn about this?

2 answers

You can achieve this through the :ReserveServer() method of TeleportService. This will generate a privatised Server for your game that requires the returned access code to travel to. In order to send Players to this place, you must also use the :TeleportToPrivateServer() method:

local TeleportService = game:GetService("TeleportService")


local AccessCode = TeleportService:ReserveServer(game.PlaceId)


TeleportService:TeleportToPrivateServer(game.PlaceId, AccessCode, {Player Array})

Tip: DONT USE TeleportService FOR GAMES IN ROBLOX ANYMORE, EXTREMELY UNRELIABLE NOW I learned this the REALLY hard way; use a lighting to workspace clone script with skybox & lighting & terrain changes, much more reliable & less bandwidth required by the player.

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