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

teleporting to reserved place working in the same game universe says that place don't exist?

Asked by
EthanFins 104
4 years ago
I have 2 places in my game universe, the lobby and the place. I'm a trying to teleport the players to this place from the lobby.

 I know it doesn't work in Roblox Studio, so I tested it in the game itself. There wasn't the normal error that pops up in the studio so that was good, but something popped up on my screen that says "Place does not exist" or something like that.

here is my code, please help

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")

while wait(.1) do
    local SecoundsLeft = 30
    game.ReplicatedStorage.HowMenySecounds.Value = SecoundsLeft
    local playerTable = {}
    if game.ReplicatedStorage.HowMenyPlayers.Value > 2 then
        for i = 1,30 do
            wait(1)
            SecoundsLeft = SecoundsLeft - 1
            game.ReplicatedStorage.HowMenySecounds.Value = SecoundsLeft
            if game.ReplicatedStorage.HowMenyPlayers.Value > 2 then
            if i == 30 then
                for i,playerName in pairs(game.Workspace.PlayersInQue:GetChildren()) do
                    table.insert(playerTable,game.Players:FindFirstChild(playerName.Name))
                    playerName:Destroy()
                end

                local code = TS:ReserveServer(4517552075) 
                TS:TeleportToPrivateServer(game.PlaceId,code,playerTable)

                end
            else
                break
            end 
        end
    end
end
0
sorry here's it fixed: EthanFins 104 — 4y
0
I have 2 places in my game universe, the lobby and the place. I'm trying to teleport the players to this place from the lobby. 2 3 I know it doesn't work in Roblox Studio, so I tested it in the game itself. There wasn't the normal error that pops up in the studio so that was good, but something popped up on my screen that says "Place does not exist" or something like that. EthanFins 104 — 4y

Answer this question