I’m trying to make a thing that lets you join friends who are playing in the same universe, so i can use it to let people join friends in different places under the same universe, i’m not very familiar with teleporting stuff so i really need help with this, as i have no idea what i’m doing, if possible to have it be able to display somewhere the name of the place they’re in? (or just getting the name to be able to do things with the place name), so that way you know what and who you’re joining.
you can use TeleportService and MessagingService
with MessagingService you can send a signal every time a player joins on a topic MessageService:PublishAsync('PlayerJoined',Player.UserId)
and you can receive signals MessageService:SubscribeAsync('PlayerJoined',function) MessageService:SubscribeAsync('FoundFriend',function)
so when a signal is received you can use Player:IsFriendsWith(OtherPlayerUserId)
and then you can send back a signal MessageService:PublishAsync('FoundFriend',Player.UserId,game.JobId)
and With teleportService you can teleport to A specific game because of the game.JobId
You can use the MessagingService class to send a message to all the servers in the experience, and then use Players:GetFriendsAsync(UserId:number) to get the player’s friends. Once you have the friends, you can find the one you are looking for and return that data back to the player.