Trouble Teleporting players

So I’m trying to achieve a teleportation system between my places
image
But every time i try to teleport i keep getting this one error in my output console which is not allowing me to teleport to a private server

This is the section of the script that is teleporting the players

local function teleportPlayers()
	if #list > 0 then
		script.Parent.GuiPart.SurfaceGui.Frame.Status.Text = "TELEPORTING"
		script.Parent.GuiPart.SurfaceGui.Frame.Status.TextColor3 = Color3.new(1,0,0)
		local playersToTeleport = {}
		local teleportTime = 0
		for i=1,#list do
			if game.Players:findFirstChild(list[i]) then
				table.insert(playersToTeleport,game.Players:findFirstChild(list[i]))
				TransitionEvent:FireClient(game.Players:findFirstChild(list[i]))
			else
				table.remove(list,i)	
			end
		end 
		local code = TS:ReserveServer(placeId)
		teleporting = true
		TS:TeleportToPrivateServer(placeId,code,playersToTeleport)
		repeat wait() until #list <= 0
		script.Parent.GuiPart.SurfaceGui.Frame.Status.Text = "READY"
		script.Parent.GuiPart.SurfaceGui.Frame.Status.TextColor3 = Color3.new(34/255,255/255,20/255)
		teleporting = false
	end
end

If anyone knows how to fix this problem, please reply i’m in dire need of help!

test it in roblox player instead of studio

1 Like

i tried that as well and i got the same results unfortunately

can you show us placeId value??? maybe its because your trying to make private server in other place than the current one

1 Like

nvm for some reason it works now, idk what happened before but it didn’t i tried now in the game place and it works just fine! thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.