Roblox GetFriendsInServerAsync: New Friends List APIs Explained
Roblox added GetFriendsInServerAsync and GetFriendsInUniverseAsync. Learn what each one returns, privacy limits, and how to build a teleport-to-friend button.
On this page
Building an in-game friends list used to mean looping through every player and asking Roblox, one by one, whether they were friends with you. On November 23, 2026, Roblox released two Player methods that do this for you: GetFriendsInServerAsync and GetFriendsInUniverseAsync. This guide explains what each returns, the privacy rules that affect the results, and how to use them for a friend list or a teleport-to-friend button.
What changed
Roblox announced both methods as a full release on the DevForum, and they are listed under the Player class in the Engine API Reference. Both yield, so they behave like other Async calls and should be wrapped in pcall.
| Method | Covers | Returns | Where to call it |
|---|---|---|---|
GetFriendsInServerAsync | The current server only | Array of Player objects | Shown on LocalPlayer in Roblox’s example |
GetFriendsInUniverseAsync | All places in your experience | Array of tables: User, PlaceId, GameId | Only on Players.LocalPlayer |
GetFriendsOnlineAsync | Anywhere on Roblox | Array of tables with VisitorId, UserName, PlaceId, GameId and more | Existing API |
Players:GetFriendsAsync | All friends, online or offline | Paged results | Existing API |
The old methods aren’t going away. Roblox’s own FAQ says to keep using GetFriendsOnlineAsync when you need friends online anywhere on Roblox, and GetFriendsAsync when you need the full friends list. The new methods are shortcuts for the two most common in-game cases.
Get friends in the same server
GetFriendsInServerAsync replaces the classic pattern of calling Players:GetPlayers() and then IsFriendsWithAsync on each result. Because it returns real Player objects, you can read DisplayName, UserId, and Character straight away.
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local ok, result = pcall(function()
return localPlayer:GetFriendsInServerAsync()
end)
if not ok then
warn("Could not load friends in this server:", result)
return
end
if #result == 0 then
print("No friends in this server right now")
end
for _, friend in result do
print(friend.DisplayName, friend.UserId)
end
What each part does:
pcallcatches a failed request so your script keeps running. If it fails,resultholds the error message instead of a list.#result == 0is the “nobody here” case. Roblox says an empty array is a normal result, not an error.- The loop reads properties directly from each
Player. From here you could fill a UI list or add a highlight tofriend.Character.
Put this in a LocalScript (for example in StarterPlayerScripts). If you’re used to checking Players.LocalPlayer properties and getting nil errors, the guide on fixing “attempt to index nil with” covers the usual causes.
Find friends anywhere in your experience
GetFriendsInUniverseAsync looks across every place in your experience, including the current server. Friends who are playing a different game are not included. Each entry is a table with three fields:
User: the friend’sUserobject. ReadUser.Idfor their user ID.PlaceId: the place the friend is currently in.GameId: theJobIdof the friend’s current server, as a string. Despite the name, it is not the experience’s ID.
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local ok, result = pcall(function()
return localPlayer:GetFriendsInUniverseAsync()
end)
if ok then
for _, friend in result do
local placeId = tonumber(friend.PlaceId)
local sameServer = friend.GameId == game.JobId
print(friend.User.Id, placeId, sameServer)
end
end
The tonumber call is there because the sources disagree. The Creator Hub reference lists 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.
Build a teleport-to-friend button
The PlaceId and GameId from GetFriendsInUniverseAsync are exactly what a “join friend” button needs. Teleports must start on the server, because TeleportService:TeleportAsync can only be called from the server. So the client sends the target to the server through a RemoteEvent.
flowchart LR
A["LocalScript: GetFriendsInUniverseAsync"] --> B["FireServer(placeId, jobId)"]
B --> C["Server checks the values"]
C --> D["TeleportAsync with ServerInstanceId"]
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")
joinFriend.OnServerEvent:Connect(function(player, placeId, jobId)
placeId = tonumber(placeId)
if not placeId or typeof(jobId) ~= "string" then
return
end
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, your button just calls JoinFriend:FireServer(friend.PlaceId, friend.GameId) with an entry from the universe list.
How the server part works:
- The server never trusts the client blindly. It converts
placeIdto a number and checks thatjobIdis a string before using them. TeleportOptions.ServerInstanceIdholds theJobIdof the server to join. Roblox only allows one server-routing field per teleport, so don’t also setReservedServerAccessCodeorShouldReserveServeron the same options.TeleportAsyncis wrapped inpcallbecause teleports can fail, for example if the friend’s server has filled up or shut down.
If you want to restrict teleports to your own places, compare placeId against a list of your experience’s place IDs before teleporting. If the event never reaches the server, see why a RemoteEvent isn’t firing. To try the teleport without publishing, Studio now supports testing teleports in playtests.
Why friends are missing from the results
Both methods respect privacy settings, so an empty or short list doesn’t always mean a bug:
- Friends who set Online status or Show current game to No One are not returned by either method.
- For Australian users under 16 who have set their developer friends list access to “No”, both methods return no friends. Roblox covers this in a separate announcement about friends list API access for those users.
- An empty array is normal when no friends are in that server or experience.
If it still doesn’t work
- Error when calling on another player:
GetFriendsInUniverseAsyncmust be called onPlayers.LocalPlayer. Move the call into a LocalScript. - Method doesn’t exist: Update Roblox Studio and make sure you’re calling it on a
Player, not thePlayersservice. These arePlayermethods. - Results look stale or empty in Studio: Solo playtests usually 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.
- Teleport fails: Check the Output for the
TeleportAsyncerror, confirm the place belongs to your experience, and make sure only one routing field is set onTeleportOptions.
As always, test these snippets in Studio and in a live server before shipping. A small friends panel that hides itself when the call fails is a safe first step, and you can add the join button once that works.
Related guides
- How to Test Teleports in Roblox Studio (November 2026 Update)
- Roblox Player Character Destroy Behavior: What Changes Nov 11
Sources
- Roblox DevForum: [Full Release] New APIs to Get Users’ In-Game/In-Server Friends Lists (November 23, 2026)
- Roblox Creator Hub: Player class reference
- Roblox Creator Hub: TeleportService reference
- Roblox Creator Hub: TeleportOptions reference
- Roblox DevForum: Upcoming friends list API access changes for Australian users under 16
- Roblox DevForum: Getting the player’s friends in a server
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 tables with the friend's User, PlaceId, and GameId (the server's JobId).
Can I call GetFriendsInUniverseAsync from a server script?
Not for an arbitrary player. Roblox's announcement says it must be called on Players.LocalPlayer and that calling it 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 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 lists it as a number, but Roblox's announcement says the engine currently returns it as a string. Wrapping it in tonumber() handles both cases.