So I have a game ready, with a lobby, after about 10 seconds the player should teleport to the main map, it makes no sense bcuz it telles me INSUFFUCIENT PRIVLAGES OR PLACE DOES NOT EXIST, but I know that the place needs to be acrive but it is INACTIVE because it is part of a game, and the place that i mentioned above that teleports, is the start place, any help??? here is my script:
--define all variables local OnlineButton = script.Parent.Frame.OnlineButton local StoryButton = script.Parent.Frame.StoryButton local RandomModeButton = script.Parent.Frame.RandomModeButton local Console = script.Parent.Frame.Console local StoryAvaliable = game.Workspace.StoryActive.Value local OnlineAvaliable = game.Workspace.OnlineAvaliable.Value local modes = {"story", "online"} local player = game.Players.LocalPlayer local tele = game:GetService("TeleportService") --functions function clearConsole(textToClear, clear) if textToClear and clear then textToClear.Text = "" else print "Error 01, unable to clear" Console.Text = "Unable to clear, Error 01 \n" end end function onClickPlay(doLoad, mode) if doLoad and mode == modes[1] then print'Loading story mode' clearConsole(Console, true) Console.Text = "Story Mode has not been made yet, please use Ejected Online" --[[for i = 1, 10 do Console.Text = "Loading Story Mode." wait(0.8) Console.Text = "Loading Story Mode.." wait(0.8) Console.Text = "Loading Story Mode..." wait(0.8) end]]-- end if doLoad and mode == modes[2] then clearConsole(Console, true) for i = 1, 5 do Console.Text = "Loading Ejected Online." wait(0.8) Console.Text = "Loading Ejected Online.." wait(0.8) Console.Text = "Loading Ejected Online..." wait(0.8) end if player then joinOnline(player) end end end function onClickRandom() local chosenMode = math.random(0, 1) if chosenMode == 1 then onClickPlay(true, modes[1]) end if chosenMode == 0 then onClickPlay(true, modes[2]) else Console.Text = Console.Text .. "Error 02, Unknown mode/Unable to randomize \n" print'Error 02, Unknown mode/Unable to randomize' end end function joinOnline(targ) tele:Teleport(266162753) end --startup OnlineButton.MouseButton1Click:connect(function() onClickPlay(true, modes[2]) end) StoryButton.MouseButton1Click:connect(function() onClickPlay(true, modes[1]) end) RandomModeButton.MouseButton1Click:connect(function() onClickRandom() end)