I am trying to make this sandbox game but to join a user's sandbox, you must have a code. I want to know how to make a "room" inside the game that can only be accessible by a key. It's going to be something like Meep city party's, where its a "room" inside the game, Meep city. Thanks!
This site is okay for scripting questions. iiConstable_Subwayx has been targeting asking questions.. So sad of a life, But here!
local TPS = game:GetService("TeleportService") --Get the teleportation service so you can teleport to a private game local code = math.random(10000, 99999) --Generate the code for using the private server. This could also be used in GUI's local GameID = 123456789 --Put your GameID here script.Parent.Touched:Connect(function(player) --Put this script in a brick. On touch it will teleport you to a private server as well as other people to this server TPS:TeleportToPrivateServer(GameID, code, player) --Teleports to the private game server. This could also be used to teleport to an existing private server via the "code" part. end)