Friend join Gui

Hello guys, im Peti and i want to make a friend join gui like the gpo one,
IMG_20230816_151748
Basically i write the game of the player in the gui and it teleports to the server with the player in it but i have a problem, i don’t know how should i do the script for it, i only know that i need to use a TeleportToPlaceInstance and basically thats all i know, anyone can help?

2 Likes

use GetPlayerPlaceInstanceAsync function [Function returns a tuple(aka a table)]

then use a server joining system or smth the TeleportToPlaceInstance function to join the server with the JobId returned in the function

also how do you trigger the TP from running?

Hi @DemonBoyy_555!

Basically i write the game of the player in the gui and it teleports to the server with the player

Was the server with the player reserved like this?

local TPService = game:GetService("TeleportService");

local code = TPService:ReserverServer(gamePlaceID)
TPService:TeleportToPrivateServer(gamePlaceID, code, {player})

If yes, then you could set up a global datastore (link of how to use it) where you save the server access code in order to teleport the next player to the same reserved server.

You could do this by writing (server side):

local TPService = game:GetService("TeleportService");

-- The code param is the same as the above and is returned by the ReserveServer function
TPService:TeleportAsync(gamePlaceID, code, {player})

I hope I could help you out a bit.

If you have any further questions, do not hesitate to ask!

1 Like

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