Party API Is Here! Enable Connected Player Experiences and Drive Deeper Engagement

Hi Creators,

Last year during RDC, we shared our vision for Party API and how it would empower you to create more connected experiences for users playing together. Today, we’re excited to announce that Party API is live and ready for you to integrate into your creations!

We understand the previous challenges of ensuring Party members can seamlessly play, spawn, and navigate your experiences together. This API directly addresses frustrating scenarios like Party members spawning apart or being split between teams or places.

While Party has already made it easier for users to join an experience together with people they know through features like “Join with Party,” the Party API builds on this by providing you with the PartyData of users who play together through Roblox’s native Party feature.

This new capability empowers you to build more connected and engaging experiences for your users. Let’s explore how to leverage the Party API to elevate your experience:

Keep Parties Together

Ensure Party members spawn in the same location and seamlessly teleport across places within your experience, maintaining their social togetherness.

This demo video is for illustrative purposes only. See how the Party API keeps members together through unified spawns and seamless teleportation.

Create Exclusive Party Experiences

Design unique in-experience benefits, challenges, or visual elements specifically for users who are part of a Party.

This demo video is for illustrative purposes only. See how you can create exclusive Party experiences, like unlocking unique UGC for purchase, with Party API.

Enhance Team-based Gameplay

Utilize Party information within your matchmaking logic to keep users on the same team, or match similar-sized parties against each other for balanced competition.

How to Integrate Party API

Ready to get started? Here’s how to integrate Party API into your experience and immediately begin enhancing the experience for Party members, leading to more engaged play sessions:

string PartyId (default "")

Add the new PartyId property to the Player instance a read-only string to identify the party the player currently belongs to. If the player is not in a party, the PartyId property is set to an empty string.

Example usage:
local Players = game:GetService("Players")

for _, player in Players:GetPlayers() do
    if player.PartyId ~= "" then
        print(player.DisplayName .. " is in party: " .. player.PartyId)
	else
        print(player.DisplayName .. " is NOT in party")
	end
end

[Method] SocialService:GetPlayersByPartyId(partyId)

Use this method to filter all connected players to return only those whose Player.PartyId matches the provided partyId. If no players match or an invalid partyId is provided, it returns an empty table.

This behaves similarly to Players:GetPlayers(), but filters the results to include only those players belonging to the specified party.

Example usage:
local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    local partyId = player.PartyId

	if partyId ~= "" then
		local partyPlayers: { Player } = SocialService:GetPlayersByPartyId(partyId)

		for _, partyMember in partyPlayers do
			print("Party Member: " .. partyMember.Name)
		end
	else
		print("Player is not in a party.")
	end
end)

[Method] SocialService:GetPartyAsync(partyId)

Use this API to return the latest PartyData, an array of PartyMemberData, associated with the provided partyId. The returned PartyData reflects the current state of the party across all active server instances within the experience. The PartyData array is ordered by the time each Party member accepts the Party invite. This means the first element in the array is the earliest to accept, and the last is the most recent.

You’ll see an error message if the provided partyId is not a valid GUID. Ensure that the PartyId Player property is not equal to an empty string to avoid this error.

PartyMemberData
Key Type Description
UserId number The player’s Player.UserId property.
PlaceId number The DataModel.PlaceId of the place the party member is currently in.
JobId string The DataModel.JobId of the game server instance the user currently resides in.
PrivateServerId string (Optional) The DataModel.PrivateServerId is included if the party member is in a private or reserved server.
ReservedServerAccessCode string (Optional) The ReservedServerAccessCode for the reserved server that the user currently resides in.
Example usage:
local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	local partyId = player.PartyId

	if partyId == "" then
		warn("Player is not in a party.")
		return
	end

	local success, partyData = pcall(function()
		return SocialService:GetPartyAsync(partyId)
	end)

	if success and partyData then
		for _, partyMemberData in partyData do
			print(
				string.format(
					[[
			Party Member:
				UserId: %s
				PlaceId: %s
				JobId: %s
				PrivateServerId: %s
				ReservedServerAccessCode: %s
			]],
					partyMemberData.UserId,
					partyMemberData.PlaceId,
					partyMemberData.JobId,
					partyMemberData.PrivateServerId,
					partyMemberData.ReservedServerAccessCode
				)
			)
		end
	else
		warn("Failed to retrieve party data.")
	end
end)

How to Test

At this time, the Party API does not work during playtesting in Roblox Studio. To test aspects of your experience using it, you must publish the experience and run it in the Roblox application. We’re exploring ways to improve the testing experience of this API in Studio in the future.

Start Building With Party API

Party API opens up a new world of connected play on Roblox. We’re excited to see your creative integrations – check out the full documentation below and start building today.

Share your feedback and let us know how you plan to implement the Party API!

The Roblox User Team

178 Likes

This topic was automatically opened after 10 minutes.

Wohoo!! This is gonna be awesome for my experience - our data shows ~2.5x longer session times when friends play together.

(P.S. the visuals in this post are top notch!)

35 Likes

This is awesome thank you. I wonder how games will use this

4 Likes

Amazing update! This will majorly alter the socio-economic balance in my Roblox experience, which will have positive consequences on the flow state of the feedback loop of my player engagement closed-loop system; a revolutionary byproduct of the marxist ideology adopted by Roblox in recent times. Just great work!

6 Likes

I really appreciate how straightforward the APIs here are. I’ve been looking forward to this since I heard it at RDC.

Time to get to work heheh…

6 Likes

Can you raise the party member limit please?

17 Likes

This would be pretty nice for integrating directly into a game, but it doesn’t seem like the api has a way to prompt the player for party join, leave, or invite. It didn’t seem like it had its own in-game interface for this either, unless I missed that. I also didn’t really know it was there because I mainly use the website interface and that seemed to be skipped for the party tab.

EDIT: did discover there is an in-game interface for this, but it would be helpful if we were able to at least force it open for the player. Overall, parties and the Party API don’t seem ready for us to rely on it as a replacement for our own party system. We could integrate support for it, but I feel it would not be as streamlined as our own interface for in-game parties, enough to replace it entirely

9 Likes

I can see so many use cases!

This is something that a gaming platform really needs, and you guys delivered!

Keep up the good work :+1:

3 Likes

Is PartyData anything like TeleportData where clients can spoof it or can you reliably retrieve it from the server?

3 Likes

so wait
can we like make “Multiplayer” systems, like for example in Phasmophobia where there’s multiplayer, if players make a Party themselves?

1 Like

This is a great feature, although it should’ve been here way earlier.

Also “SocialService” doesn’t feel right. Isn’t the chat about being social too — because then it would have to be named “SocialService” — but no, that name is just too broad.

A better name could be “PartyService”.

1 Like

I might have accientally skipped over when reading but, can we make parties?

1 Like

One way would be to integrate it into PlayerEmulator or create a new Emulator Plugin, called “PartyEmulator” which will allow you to imitiate a party with a certain amount of players.

3 Likes

This’ll be great for friend groups (even though I thought the party feature was already implemented)
Though, please tell me that partying won’t use up more CoreGui as seen in the demo video, the CoreGui is already bad enough as is (also what about reserved/small servers?)

That’s incredible! It’s great that you can be on the same server as your friend without difficulty, and even better that you can join at the same time.

I can’t wait for the voice chat version to arrive, it will make the experience even more immersive.

SocialService isn’t new from what what I remember, it handles multiple things. It feels right to me considering parties are social, but I agree that PartyService or just Party would be a way better name And shorten method names.

1 Like

This is great, but could joining friends in general be fixed? The expected behavior is that, when you join the same experience that a friend is playing, you would join their server. However, this doesn’t appear to work with friends in different regions. It works when I play with others in the US, but not when joining people in the UK for example. I have to join them through the actual server list or profile page.

For quick prototyping and testing, please figure out a way so that we can use emulate parties with Local Servers or through Team Test! Publishing and testing each time will be tedious and slow for our workflows.

Now, how does someone mock test this? :thinking:

Preferably without alt accounts.

We have to wait for the future :thinking:

Is PartyId read-only on all levels? :thinking:

1 Like