So I was making an "alpha tester code" gui, and this is the code
01 | local player = script.Parent.Parent.Parent.Parent.Parent |
02 | local code = "KS6GSH1GLP" |
03 | local bleedingsky = 334856307 |
04 |
05 |
06 | script.Parent.Enter.MouseButton 1 Click:connect( function () |
07 | if script.Parent.TextLabel.Text = = code then |
08 | script.Parent.Enter.Text = "Valid code - Teleporting in 2.5 seconds" |
09 | script.Parent.Enter.BackgroundColor 3 = Color 3. new( 0.3 , 1 , 0.3 ) |
10 | script.Parent.Enter.Selectable = false |
11 | wait( 2.5 ) |
12 | game:GetService( "TeleportService" ):Teleport(bleedingsky, player) |
13 | else |
14 | script.Parent.Enter.Text = "Invalid code - Rejoin to retry" |
15 | script.Parent.Enter.BackgroundColor 3 = Color 3. new( 1 , 0.3 , 0.3 ) |
16 | script.Parent.Enter.Selectable = false |
17 | end |
18 | end ) |
Please note that the variable bleedingsky
is an inactive place ID. I was wondering if this is possible.
The problem The problem maybe isn't in the script, it is linked with the place! You need to do the following below this text.
Solving You need to go to the place that teleports to the inactive place then click the 3 dots then Configure this Game. After this go to places. You can see your game as a Start Place. In the Other Games tab click Add place. Browse games then click at the inactive game you want players teleport to. Now save and enjoy!
-Rabbit