:TeleportToPrivateServer() BUG

Script :cold_sweat:

local Part = script.Parent
local TpService = game:GetService("TeleportService")
local Access = TpService:ReserveServer(17884687093)
local Players = {}

Part.Touched:Connect(function(Hit)
	if Hit.Name == "HumanoidRootPart" then
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		if Player then
			table.insert(Players, Player)
			TpService:TeleportToPrivateServer(17884687093, Access, Players)
		end
	end
end)

Problem :cold_sweat: :roll_eyes:

When I test this with my alt, my alt was able to join me to β€œ17884687093” (which is a place inside of my game/experience)
I’m also getting this Error now (somehow) HTTP 403 (Forbidden). I literally only made a couple of changes
:cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:

Is the error 403 happening on your alt account or your main account?

if alt, make the place public if it isn’t already.
if main, idk what to do lol

Just save and publish the place and if the error is still happening its likely a bug. What changes did you make to your game?

I changed it from using workspace:GetPartsInPart() to .Touched(). Also the game is already public

I’m not getting that error anymore so the only problem now is :

@NativeAmerican315 The problem doesn’t happen if I teleport to the place with my alt and then teleport to the place with my main on a new server

Putting the code in the function

local Part = script.Parent
local TpService = game:GetService("TeleportService")
local Players = {}
local Active = true

Part.Touched:Connect(function(Hit)
	if Hit.Name == "HumanoidRootPart" then
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		if Player and Active  then
			local Access = TpService:ReserveServer(17884687093)
			Active = false
			table.insert(Players, Player)
			TpService:TeleportToPrivateServer(17884687093, Access, Players)
			Players = {}
			wait(10)
			Active = true
		end
	end
end)
1 Like

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