I already made this exact post but nobody said anything, and I didn’t get my answer, so I’m gonna repost this again.
Hi I want to make something that will let you join a friend,
and the server the friend is in is a reserved server,
so I made this code that saves the reservedServer code in a GrobalDataStore and teleport you to the reserved server, but this error message shows up and I can’t join.
-- this is the resrve and teleport and save
local TeleportService = game:GetService("TeleportService");
local PlaceID = 8043901258;
local ReservedServer = TeleportService:ReserveServer(PlaceID);
script.Parent.Buttons.Play.MouseButton1Click:Connect(function()
ServersData:SetAsync(Player.UserId, {GameID = ReservedServer});
TeleportService:TeleportToPrivateServer(PlaceID, ReservedServer, game.Players:GetPlayers());
end)
--this is the join script
local Data = ServersData:GetAsync(Friend.Id);
TeleportService:TeleportToPrivateServer(PlaceID, Data.GameID, game.Players:GetPlayers());