Reserve Server not working nor is calling it

My current is is that for some reason the reserve server in my game is not being called.

  1. The code in my game has been thoroughly tested and has worked many many times before.

  2. No changes have recently been made to the script that has made it not work.

  3. Usually in Roblox Studio or in Roblox Player it will show that it’s called it, in Studio this is shown saying it can’t be called in Studio, in Roblox Player it just teleports the player.

There is the possibility I closed Roblox Studio without saving it or the Auto Save canceled, I am not sure, I am also open to the fact I did edit something and made that mistake and just overlooked it in memory.


--Variables and code for reserve server stuff
local MainMusic = game.SoundService["Distorted Reality Perception - Leon Riskin"]

local reserve = game.StarterGui.ScreenGui.PlayFrame.GameTypeButton1
local debounce = false
local ScreenGui = game.StarterGui.ScreenGui

	print("starting reserve")
	if debounce then return end 
	debounce = true

	local ts = game:GetService("TeleportService")
	local access = ts:ReserveServer(game.PlaceId)
	ts:TeleportToPrivateServer(game.PlaceId, access, game.Players:GetPlayers())
	warn("Teleporting everybody...")

	debounce = false

local Players = game:GetService("Players")

local player = script:FindFirstAncestorOfClass("Player")

local Camera = workspace.CurrentCamera
local Players = game:GetService("Players")
local isReserved = game.PrivateServerId ~= "" and game.PrivateServerOwnerId == 0

if isReserved == true then
	print("reserved is true")
	ScreenGui.Enabled = false
	Camera.CameraType = Enum.CameraType.Custom
	MainMusic.Playing = false

It is a Script in StartGui. The ScreenGui is completely separate.

local isReserved = game.PrivateServerId ~= "" and game.PrivateServerOwnerId == 0

I believe this line is the issue. The if statement below ask if it is true.

Also, I think the creator of it was trying to go for this.

local isReserved 
if game.PrivateServerId ~= "" and game.PrivateServerOwnerId == 0 then
isReserved  = true

I am not a hundred percent sure at this time. Hope this helps.

1 Like

I get how this might work but it hasn’t :((
I appreciate it though!!

Oh, I apologize. I did my research and the line I changed was used to check if the current server was reserved. If I was in your current position I would try printing the ReserveServer to see if it actually prints anything. (To check if it’s being called like you said)

1 Like

I am sorry. I just re-read what you said. You can not teleport to a different place within Studio.

1 Like

Yes. The way I test in Studio is it shows the https error when calling for it in studio, that way I know if it works or not.