So I was making an "alpha tester code" gui, and this is the code
local player = script.Parent.Parent.Parent.Parent.Parent local code = "KS6GSH1GLP" local bleedingsky = 334856307 script.Parent.Enter.MouseButton1Click:connect(function() if script.Parent.TextLabel.Text == code then script.Parent.Enter.Text = "Valid code - Teleporting in 2.5 seconds" script.Parent.Enter.BackgroundColor3 = Color3.new(0.3, 1, 0.3) script.Parent.Enter.Selectable = false wait(2.5) game:GetService("TeleportService"):Teleport(bleedingsky, player) else script.Parent.Enter.Text = "Invalid code - Rejoin to retry" script.Parent.Enter.BackgroundColor3 = Color3.new(1, 0.3, 0.3) script.Parent.Enter.Selectable = false end 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