I made an UI where you can invite players to play togheter. I used LocalScripts, that didn't work. Then i used a RemoteEvent to teleport the party to a private server. Heres my code:

LocalScript inside the player gui:

local second
local third
local fourth

-- A lot of if-then-elses here

script.Parent.Start.MouseButton1Click:Connect(function()
	
	print("START")
	game.ReplicatedStorage.TeleportEventw2a:FireServer(second, third, fourth)
	
end)

ServerScript inside the ServerScriptService

game.ReplicatedStorage.TeleportEventw2a.OnServerEvent:Connect(function(player, second, third, fourth)
	
	local players = {player, second, third, fourth}
	local code = game["Teleport Service"]:ReserveServer(3315989953)
	game["Teleport Service"]:SetTeleportGui(game.ReplicatedStorage:Clone())
	game["Teleport Service"]:TeleportToPrivateServer(3315989953, code, {players})
	
end)

The console writes out HTTP403(Forbidden), and noone gets teleported. Where's the problem?

5 comments

1

If you're testing in studio it won't work!

0

studio prevents any teleportation since it doesnt have access to other games

0

I know, I published and tried it already. Nothing

0

If the third or fourth variables are empty, can that be a problem?

0

With the same script, but the place id replaced to game.PlaceId works. Is that a problem with the othe place?