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

How would I make a "room" inside a server?

Asked by 4 years ago

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!

0
Read the rules before posting, this site is for people looking for help with their existing code iiConstable_Subwayx 130 — 4y

1 answer

Log in to vote
0
Answered by
Lakodex 711 Moderation Voter
4 years ago
Edited 4 years ago

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)
0
Thank you so much! BradNewTypical 232 — 4y
0
Please read the site guidelines before targeting other users and the one against providing users with free scripts. Giving people code before they attempt themselves won't help them. You as a moderation voter should already know this: https://scriptinghelpers.org/help/community-guidelines xPolarium 1388 — 4y
0
bruh chill, it's an example, I am going to make that wayyy more complicated. BradNewTypical 232 — 4y
Ad

Answer this question