Log in
Login Sign up Blog Tools

How to Show Friends in Your Roblox Game: GetFriendsInServerAsync and GetFriendsInUniverseAsync

Roblox released two new Player methods on November 23, 2026: GetFriendsInServerAsync finds friends in your current server, and GetFriendsInUniverseAsync finds them anywhere in your game. Here is what each one returns, the privacy rules that shape the results, and how to build a join-friend button.

How to Show Friends in Your Roblox Game: GetFriendsInServerAsync and GetFriendsInUniverseAsync
In this guide What the Two New Methods Do GetFriendsInServerAsync: Friends in This Server GetFriendsInUniverseAsync: Friends Anywhere in Your Game Build a Join-Friend Button Why Some Friends Are Missing From the Results If It Still Does Not Work Frequently Asked Questions What does GetFriendsInServerAsync return? What is the difference between GetFriendsInServerAsync and GetFriendsInUniverseAsync? Can I call GetFriendsInUniverseAsync from a server script? Why are some of my friends missing from the results? Is PlaceId a number or a string? Do I still need GetFriendsOnlineAsync? Related Guides on RBXMods Sources

Until recently, showing a player which friends were in the same game meant looping through every player in the server and checking each one. On November 23, 2026, Roblox released two new Player methods that do that lookup for you: GetFriendsInServerAsync finds friends in the current server, and GetFriendsInUniverseAsync finds friends anywhere in your experience, across all of its places. This guide covers both methods — what each one returns, the rules that limit the results, and how to turn them into a friends list and a join-friend button.

Key takeaways

  • Roblox released GetFriendsInServerAsync and GetFriendsInUniverseAsync as a full release on November 23, 2026 — both are Player methods, and both need to be wrapped in pcall.
  • GetFriendsInServerAsync returns an array of Player objects for friends in the current server, not including the player you called it on.
  • GetFriendsInUniverseAsync returns a dictionary array — one dictionary per friend — with the friend's UserId, PlaceId, GameId (the server's JobId), FriendUserId and DisplayName — and it can only be called on Players.LocalPlayer.
  • An empty result is normal, not an error: it means no friends are there right now, or their privacy settings hide them.
  • Teleports must start on the server, so a join-friend button sends the PlaceId and GameId through a RemoteEvent and the server runs the teleport.

What the Two New Methods Do

The two methods answer two different questions. GetFriendsInServerAsync answers "who are my friends in this server?" — the room the player is standing in right now. GetFriendsInUniverseAsync answers "where are my friends anywhere in my game?" — including other places of the same experience, such as a lobby, a second map, or a minigame area. A friends list above the leaderboard wants the first; a "join your friend" button wants the second.

MethodCoversReturnsCall it on
GetFriendsInServerAsyncThe current server onlyAn array of Player objectsAny Player, usually Players.LocalPlayer
GetFriendsInUniverseAsyncEvery place in your experienceA dictionary array: UserId, PlaceId, GameId, FriendUserId, DisplayNameOnly Players.LocalPlayer
GetFriendsOnlineAsync (older)Anywhere on RobloxAn array of tables with UserId, UserName, PlaceId, GameId and moreAny Player
Players:GetFriendsAsync (older)All friends, online or offlinePaged resultsThe Players service

Both new methods yield while Roblox looks the answer up, so they behave like every other Async call: wrap them in pcall, and never assume the call succeeded. Roblox's guidance is to keep using the older methods for the cases they cover: GetFriendsOnlineAsync when you need friends who are online anywhere on Roblox, and GetFriendsAsync when you need the full friends list including people who are offline. The new methods are shortcuts for the two cases that come up inside a game — with one trade-off: they leave out friends who hide their online status, so a count built from them is not exact. If an exact friend count matters, keep the older pattern for that one job.

GetFriendsInServerAsync: Friends in This Server

This method replaces the classic pattern of calling Players:GetPlayers() and running IsFriendsWithAsync on every result. Because it returns real Player objects, you can read DisplayName, UserId and Character straight from the result — enough to fill a friends panel without a second lookup.

local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer

local ok, friendsInServer = pcall(function()
	return localPlayer:GetFriendsInServerAsync()
end)

if not ok then
	warn("Could not load friends in this server:", friendsInServer)
	return
end

if #friendsInServer == 0 then
	print("No friends in this server right now")
end

for _, friend in friendsInServer do
	print(friend.DisplayName, friend.UserId)
end

Three details in that snippet matter. First, pcall catches a failed request so your script keeps running. Second, an empty array is a normal result, not an error — handle it gracefully instead of showing one. Third, the player you call the method on is not included, so do not add yourself to the list afterwards. Put this in a LocalScript — StarterPlayerScripts is a natural home — and remember that a friend's Character can still be nil just after they join or respawn, so check it before reading parts from it. If you are new to LocalScripts, our first Lua script guide covers where each script type runs.

Illustration of two blocky game characters in different areas of a game world, connected by a glowing path of light

GetFriendsInUniverseAsync: Friends Anywhere in Your Game

The universe method looks across every place in your experience, including the current server — but not other games entirely; the scope is your experience, not all of Roblox. Each entry is a dictionary with five fields: UserId, the friend's user ID; PlaceId, the place the friend is currently in; GameId, the JobId of the friend's current server, as a string; FriendUserId, the same user ID again, kept for compatibility with older code; and DisplayName, the friend's display name. Despite the name, GameId is not the experience's ID — it identifies one running server.

local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer

local ok, friendsInUniverse = pcall(function()
	return localPlayer:GetFriendsInUniverseAsync()
end)

if ok then
	for _, friend in friendsInUniverse do
		local placeId = tonumber(friend.PlaceId)
		local sameServer = friend.GameId == game.JobId
		print(friend.UserId, placeId, sameServer)
	end
end

The tonumber call is defensive, and worth keeping. The Creator Hub reference describes PlaceId as a number, while Roblox's announcement says the engine currently returns it as a string — converting it covers both. Comparing GameId with game.JobId tells you whether that friend is already in your server, which is how a join button knows to hide itself for friends you are already playing with.

The hard rule is where you call it: only on Players.LocalPlayer. Calling it on any other player causes an error, so it belongs in a LocalScript. If you need every player's friends, each client asks for its own list and reports back — do not call this method on other players from a server script.

Build a Join-Friend Button

The PlaceId and GameId from the universe method are exactly what a "join friend" button needs, and this is where the two methods earn their keep. Teleports must start on the server, because TeleportService:TeleportAsync can only be called from a server Script. So the client sends the target to the server through a RemoteEvent, and the server does the teleporting. Create a RemoteEvent named JoinFriend in ReplicatedStorage, then add this Script to ServerScriptService:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TeleportService = game:GetService("TeleportService")

local joinFriend = ReplicatedStorage:WaitForChild("JoinFriend")

-- Fill this table with your experience's place IDs:
-- ALLOWED_PLACE_IDS[yourPlaceId] = true. Requests for any other
-- place are ignored.
local ALLOWED_PLACE_IDS = {}

local lastRequest = {}

joinFriend.OnServerEvent:Connect(function(player, placeId, jobId)
	placeId = tonumber(placeId)
	if not placeId or not ALLOWED_PLACE_IDS[placeId] then
		return
	end
	if typeof(jobId) ~= "string" or jobId == "" or #jobId > 64 then
		return
	end

	local now = os.clock()
	if lastRequest[player] and now - lastRequest[player] < 5 then
		return -- one join request per player every 5 seconds
	end
	lastRequest[player] = now

	if jobId == game.JobId then
		return -- already in that server
	end

	local options = Instance.new("TeleportOptions")
	options.ServerInstanceId = jobId

	local ok, err = pcall(function()
		return TeleportService:TeleportAsync(placeId, { player }, options)
	end)
	if not ok then
		warn("Teleport to friend failed:", err)
	end
end)

On the client, the button just calls JoinFriend:FireServer(friend.PlaceId, friend.GameId) with an entry from the universe list. The server checks every request before acting on it: the place must be in the allow-list, the job ID must be a non-empty string, and each player gets at most one request every five seconds. The server also skips the teleport if the friend is already in this server. TeleportOptions.ServerInstanceId holds the JobId of the server to join, and Roblox only allows one server-routing field per teleport, so do not also set ReservedServerAccessCode or ShouldReserveServer on the same options. TeleportAsync can only be called from a server Script, so the teleport has to live here — the old client-side Teleport method does not work with the newer teleport system. TeleportAsync is wrapped in pcall because teleports can fail — the TeleportResult enum lists a full server (GameFull) and an ended server (GameEnded) among the possible results. Our teleport testing guide covers trying this in Studio playtests, and our RemoteEvents guide covers the client-to-server pattern in full.

Illustration of a blocky game character stepping through a glowing teleport portal toward a waiting friend

Why Some Friends Are Missing From the Results

Both methods respect privacy settings, so a short or empty list does not always mean a bug. Friends who set their Online status or their "Show current game" setting to No One are not returned by either method — Roblox cannot show you someone who has chosen not to be seen. There is also a regional rule, confirmed in the announcement's FAQ: since September 30, 2026, Roblox restricts the Friends APIs for Australian users under 16 who have set their developer friends list access to "No". For those players, both methods return no friends at all. Our bio privacy guide covers the wider December 2026 privacy changes, including the profile bio audience setting that rolls out on December 7.

One more rule, about the data itself: use a friend list only for the live panel on screen right now. Do not store it, log it, or send it anywhere off the platform, and consider letting players opt out of being joinable. A friends list is social information about real people, including younger players — it should not outlive the session that asked for it.

The practical consequence is a design rule: do not build gameplay that depends on these lists. When a call fails, keep the last successful result, or hide the social UI for that session. A party system, squad bonus or reward that requires a friend list would break for players whose friends hide their status — or simply are not online. Treat the friends list as a convenience feature, and make sure the game plays exactly the same with it hidden.

If It Still Does Not Work

Error when calling on another player. GetFriendsInUniverseAsync must be called on Players.LocalPlayer. Move the call into a LocalScript.

Method does not exist. Update Roblox Studio and make sure you are calling it on a Player, not on the Players service. These are Player methods, added in the November 23, 2026 release.

Results look stale or empty in Studio. Solo playtests have only you in the server, so there are no friends to find. Test in a live server, or with friends in a Team Test, before deciding the code is broken.

Teleport fails. Check the Output window for the TeleportAsync error, confirm the place belongs to your experience, and make sure only one routing field is set.

Build the friends panel first and the join button second, and test both with a real friend in a live server before you ship them.

Frequently Asked Questions

What does GetFriendsInServerAsync return?

It returns an array of Player objects for the player's friends who are in the same server. The player you call it on is not included, and an empty array simply means no friends are in that server.

What is the difference between GetFriendsInServerAsync and GetFriendsInUniverseAsync?

GetFriendsInServerAsync only covers the current server and gives you Player objects. GetFriendsInUniverseAsync covers every place in your experience and returns a dictionary array — one dictionary per friend — with UserId, PlaceId, GameId (the server's JobId), FriendUserId and DisplayName.

Can I call GetFriendsInUniverseAsync from a server script?

No. Players.LocalPlayer only exists on the client, and the announcement says calling this method on any other player causes an error, so it belongs in a LocalScript.

Why are some of my friends missing from the results?

Friends who set their Online status or "Show current game" to No One are not returned. Roblox also returns no friends for Australian users under 16 who have turned off developer access to their friends list.

Is PlaceId a number or a string?

The Creator Hub reference describes it as a number, but Roblox's announcement says the engine currently returns it as a string. Wrapping it in tonumber() handles both cases.

Do I still need GetFriendsOnlineAsync?

Yes, if you need friends who are online anywhere on Roblox, not just in your game. The new methods only cover your server and your experience; GetFriendsOnlineAsync covers the whole platform, and Players:GetFriendsAsync returns the full friends list including people who are offline.

Related Guides on RBXMods

RBXMods is not affiliated with or endorsed by Roblox Corporation. Roblox and the Roblox logo are trademarks of Roblox Corporation.

Sources

Sources last reviewed December 1, 2026; each page was verified loading on the date noted beside it.

  • Roblox Developer Forum: [Full Release] New APIs to Get Users' In-Game/In-Server Friends Lists — the November 23, 2026 announcement of both methods: the "dictionary array" return with UserId, PlaceId, GameId, FriendUserId and DisplayName, the LocalPlayer-only rule for the universe method, and the FAQ confirming both methods return no friends for Australian users under 16 with access set to "No". (Verified loading in the live browser 2026-12-01.)
  • Roblox Creator Docs: Player (Engine API Reference) — GetFriendsInServerAsync returns an array of Player objects for friends in the same server; GetFriendsInUniverseAsync returns a dictionary array of friends in the universe, each dictionary with UserId, PlaceId, GameId, FriendUserId and DisplayName; GetFriendsOnlineAsync's typed fields (UserId, UserName, PlaceId, GameId, IsOnline, LastLocation, DisplayName). (Verified loading in the live browser 2026-12-01.)
  • Roblox Creator Docs: Teleport Between Places — TeleportAsync can only be called from server scripts; handling failed teleports. (Verified loading in the live browser 2026-12-01.)
  • Roblox Creator Docs: TeleportOptions (Engine API Reference) — ServerInstanceId, the instance ID of the server the player teleports to, and the rule that only one server-routing field may be set at a time. (Verified loading in the live browser 2026-12-01.)
  • Roblox Creator Docs: TeleportResult (Engine API Reference) — GameFull (the server is full) and GameEnded (the server has ended) among the possible teleport results. (Verified loading in the live browser 2026-12-01.)
  • Roblox Developer Forum: Upcoming Friends List API Access Changes for Australian Users Under 16 — the September 5, 2026 announcement that from September 30, 2026 Roblox restricts the Friends APIs (listing GetFriendsAsync, GetFriendsOnlineAsync and GetFriendsWhoPlayedAsync) for Australian users under 16; coverage of the two new methods comes from the November 23 announcement's FAQ. (Verified loading in the live browser 2026-12-01.)
Pawan Nagare
Written by

Pawan Nagare

I'm Pawan Nagare, and I run RBXMods. I write practical Roblox guides about how games are actually made — Roblox Studio, scripting, publishing and growing a game — along with clear fixes for the errors and confusing changes players run into.

Every guide here is researched against official Roblox documentation and checked against the current version of Roblox before it is published — and I update posts when Roblox changes the rules.

My aim is simple: honest, up-to-date help that respects your time — no recycled lists, and no shortcuts that put your account at risk.