Why is the private server teleport code not working?

Hi guys, I dont get it whats the issue with this code? When it gets called the player doesnt teleport

-- Server script
 game.Players.PlayerAdded:Connect(function(player)
	local data = TeleportService:ReserveServer(game.PlaceId)
	print(data)
	
	local access_code = data.reservedServerAccessCode
	print(access_code)
	TeleportService:TeleportToPrivateServer(game.PlaceId,access_code,{player})
end)

It just prints the accesscode meanwhile the teleporttoprivateserver doesnt do anything… it yields.

ReserveServer already gives the reserved server access code so you dont need to make a variable for that, just pass the data into the teleport

Thank you sm!!! didnt think it was this :joy:

1 Like

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