Class
SocialService
NotCreatableServiceNotReplicated
Facilitates social functions that impact relationships made on the Roblox platform.
SocialService facilitates social functions that impact relationships made
on the Roblox platform. Its primary usage is to show
invite prompts and the
phone book to players, allowing them to send invitation requests to their
friends through PromptGameInvite()
and PromptPhoneBook() respectively.
You may leverage signals when such requests are made.
Methods 15#
| CanSendCallInviteAsync | Indicates whether the given Player can invite other players to a
call.Yields |
| CanSendGameInviteAsync | Indicates whether the given Player can invite other players.Yields |
| GetEventRsvpStatusAsync | Returns the local player's RSVP status for the given event.Yields |
| GetExperienceEventAsync | Returns details for the specified experience event or nil if it is
unavailable.Yields |
| GetPartyAsync | Returns an array of dictionaries containing data for all members of the specified party who are currently in the experience.Yields |
| GetPlayersByPartyId | Returns a table of all presently connected Player objects whose
Player.PartyId property matches the passed partyId. |
| GetUpcomingExperienceEventsAsync | Returns active and upcoming experience events for the current experience.Yields |
| HideSelfView | Hides the calling player's self view. |
| PromptFeedbackSubmissionAsync | Prompts the player to submit feedback or a player support ticket about the current experience.Yields |
| PromptGameInvite | Prompts the given Player with the invite screen. |
| PromptLinkSharing | DeprecatedYields |
| PromptLinkSharingAsync | Generates an expiring share link and prompts the given Player with
the platform share sheet.Yields |
| PromptPhoneBook | Prompts the given Player with the phone book. |
| PromptRsvpToEventAsync | Prompts the local Player with a prompt to change their RSVP status
to the given event.Yields |
| ShowSelfView | Shows the calling player's self view. |
CanSendCallInviteAsync(player: Instance): boolean#
Yields
Returns true if the given Player can send a call invite to a
friend. You should always use the result of this method before calling
PromptPhoneBook() since the
ability to open the phone book may vary depending on the player.
| Name | Type | Default | Description |
|---|---|---|---|
player | Instance | The Player instance of the player potentially sending a call
invite. |
Returns
boolean— Whether the specified player can send a call invite.
CanSendGameInviteAsync(player: Instance, recipientId: User = U1.AQAAAAAAAAAAAAAAAAAAAAA): boolean#
Yields
CanSendGameInviteAsync()
returns true if the given Player can invite other players to the
current experience. You should always use the result of this method before
calling PromptGameInvite() since
the ability to invite players may vary depending on the platform or
player.
See Player Invite Prompts for more details on implementing player invite prompts, customizing prompts and notifications, and using launch data.
| Name | Type | Default | Description |
|---|---|---|---|
player | Instance | The Player instance of the player potentially sending an
invite. | |
recipientId | User | U1.AQAAAAAAAAAAAAAAAAAAAAA | Optional Player.UserId of the potential recipient, used to
check whether the sender can invite that specific recipient. |
Returns
boolean— Whether the specified player can send an invite.
GetEventRsvpStatusAsync(eventId: string): RsvpStatus#
Yields
Returns the local player's RSVP status for the given event. Events must be in the current experience and must not have already started. If the event has already started, this method will return an error.
Use
GetUpcomingExperienceEventsAsync()
to obtain a valid event ID at runtime rather than hardcoding one. Note
that you can use
PromptRsvpToEventAsync() to
prompt the player to change their RSVP status for the event.
| Name | Type | Default | Description |
|---|---|---|---|
eventId | string | The event ID of the event to prompt the player to change their RSVP status for. This must be a valid event ID that exists in the current experience, represented as a string (not a number). |
Returns
RsvpStatus— Returns anRsvpStatusindicating the player's current RSVP status for the event. If the player has not RSVP'd to the event, this will returnRsvpStatus.None.
GetExperienceEventAsync(eventId: string): ExperienceEvent?#
Yields
GetExperienceEventAsync() yields until the request completes and then
returns a dictionary describing the requested event. The dictionary
contains the following fields:
Id(string)Title(string)Subtitle(string)Description(string)DisplayTitle(string)DisplaySubtitle(string)DisplayDescription(string)ThumbnailIds(array of numbers): Asset IDs for the event thumbnails. The first ID is the primary thumbnail.StartTime(dictionary)Day(number)Year(number)Month(number)Minute(number)Millisecond(number)Hour(number)Second(number)
EndTime(dictionary)Day(number)Year(number)Month(number)Minute(number)Millisecond(number)Hour(number)Second(number)
HasStarted(boolean)HasEnded(boolean)Status(ExperienceEventStatus)UserRsvpStatus(RsvpStatusornil)
If the event cannot be found, belongs to a different experience, or the
response is malformed, this method returns nil. Requests may also fail
with a HttpError message if the service returns an unexpected
error code.
| Name | Type | Default | Description |
|---|---|---|---|
eventId | string | The string identifier of the event to retrieve. Must correspond to an event in the current experience. |
Returns
ExperienceEvent?— A dictionary describing the event, ornilif the event does not exist, belongs to another experience, or is otherwise unavailable.
GetPartyAsync(partyId: string): Array#
Yields
Returns an array of dictionaries containing data for all members
associated with the given partyId. The returned array reflects the
current state of the party across all active server instances within the
experience and it is ordered by the time each party member accepted the
party invite. This means the first element in the array is the earliest to
accept and the last is the most recent.
This method is useful for retrieving up-to-date information about all party members currently in the experience and across different servers, enabling coordinated group behavior such as teleportation, matchmaking, or party-based gameplay logic.
Each dictionary in the returned array contains the following fields:
| Key | Value Type | Description |
|---|---|---|
UserId |
number | The player's Class.Player.UserId property. |
PlaceId |
number | The Class.DataModel.PlaceId of the place the party member is currently in. |
JobId |
string | The Class.DataModel.JobId of the server instance the user currently resides in. |
PrivateServerId |
string | If applicable, the Class.DataModel.PrivateServerId when the party member is in a private or reserved server. |
ReservedServerAccessCode |
string | If applicable, the access code for the reserved server that the user currently resides in. Useful for teleporting party members to each other using Class.TeleportService:TeleportAsync(). |
To test this service in your experience, use the Party Simulator in Roblox Studio or publish the experience and play it in the Roblox application.
| Name | Type | Default | Description |
|---|---|---|---|
partyId | string | The unique identifier of the party to retrieve member data for,
corresponding to a Player.PartyId value. |
Returns
Array— An array of dictionaries representing the members of the specified party who are currently in the experience.
GetPlayersByPartyId(partyId: string): List<Player>#
Returns a table of all presently connected Player objects whose
Player.PartyId property matches the provided partyId. This
method behaves similarly to Players:GetPlayers() but filters the
results to include only those players belonging to the specified party.
To test this service in your experience, use the Party Simulator in Roblox Studio or publish the experience and play it in the Roblox application.
| Name | Type | Default | Description |
|---|---|---|---|
partyId | string | The unique identifier of the party to filter players by, corresponding
to a Player.PartyId value. |
Returns
List<Player>— A table ofPlayerobjects whosePlayer.PartyIdproperty matches the passedpartyId.
GetUpcomingExperienceEventsAsync(): List<ExperienceEvent>#
Yields
GetUpcomingExperienceEventsAsync() yields while the client requests data
for the current experience and then returns an array of dictionaries, each
with the same structure described in
GetExperienceEventAsync().
The array includes only events that are currently active or have not yet
ended, excluding cancelled, moderated, or unpublished events. Results are
sorted so the soonest start time appears first.
Use this method to discover valid event IDs at runtime rather than hardcoding them; hardcoded IDs become stale when events end and cause RSVP prompts to fail until the experience is republished.
If the service indicates there are no matching events, this method returns
an empty array. Requests may raise a HttpError message if the
service returns an unexpected error code.
Returns
List<ExperienceEvent>— An array of dictionaries describing each active or upcoming event in the current experience, ordered by soonest start time first.
HideSelfView(): ()#
Hides the calling player's self view. If this method is called while the self view is already hidden, it does nothing.
Returns
()
PromptFeedbackSubmissionAsync(options: Dictionary?): ()#
Yields
Displays a dialog to the player, allowing them to provide feedback about their experience or submit a player support ticket.
- The submitted feedback becomes available to developers in the Creator Dashboard under the Audience > Feedback section.
- The submitted player support requests become available to developers in the Creator Dashboard under the Audience > Player Support section. The Player Support flow is currently in alpha and is only available to select experiences.
This method yields until the player either submits feedback, dismisses the
dialog, or a timeout is reached. As an asynchronous operation, it should
be called using task.spawn() or within a coroutine.
Feedback Types#
The FeedbackType key in the options dictionary determines which flow is
displayed:
FeedbackType.Feedback(default) — Displays a general feedback prompt where the player can rate and comment on the experience.FeedbackType.PlayerSupport— (Alpha; select experiences only) Displays a player support flow where the player can submit a categorized support ticket directly to the experience developer. This enables in-experience customer support without requiring players to leave the game.
Feedback Flow#
When FeedbackType is FeedbackType.Feedback (or omitted), the
player is shown a general feedback prompt where they can rate and
optionally comment on the experience. Submitted feedback appears in the
Creator Dashboard under Audience > Feedback. Players can submit
feedback once per day per experience.
Player Support Flow (Alpha)#
When FeedbackType is set to FeedbackType.PlayerSupport, the
player is guided through a support ticket submission flow. This flow is
currently in alpha and is only available to select experiences. The
prompt presents a form where the player selects a category, writes a
description of their issue, and chooses whether to share their user ID
with the developer. The available categories are:
| Category | Description |
|---|---|
| Bug Report | The player is reporting a bug or technical issue. |
| Data Restore Request | The player is requesting that lost or corrupted data be restored. |
| Purchasing Issue | The player has an issue with an in-experience purchase. |
| Other | A general issue that does not fit the other categories. |
The player also chooses whether to share their Player.UserId with
the developer as part of the ticket.
Eligibility#
Before showing the prompt, this method performs an eligibility check. The eligibility rules differ depending on the feedback type.
A player is ineligible for the Feedback flow if:
- The player is the experience owner (developers cannot submit feedback for their own experiences).
- The player has been rate limited (submitted too many reviews recently).
- The player does not meet age requirements.
A player is ineligible for the Player Support flow if:
- The player does not meet age requirements.
- The player already has 5 in-progress tickets.
- The player is banned from the experience.
If the player is ineligible, the prompt displays a message indicating that feedback or support is unavailable and the method returns without error.
Notes#
- This service does not work during playtesting in Roblox Studio. To test the feedback prompt, you must publish the experience and play it in the Roblox application.
- The method will time out and resume if the player does not interact with the prompt within a reasonable period.
- If the submission fails due to a text filter violation or network error, the player is notified within the dialog.
| Name | Type | Default | Description |
|---|---|---|---|
options | Dictionary? | Optional Dictionary configuring the prompt. Supported keys: -
FeedbackType (FeedbackType). Selects which feedback flow to
display. Defaults to FeedbackType.Feedback. |
Returns
()
PromptGameInvite(player: Instance, experienceInviteOptions: Instance = nil): ()#
PromptGameInvite() displays an
invite prompt to the local player through which they may invite their
friends to the current experience. Before calling this method, you should
use
CanSendGameInviteAsync() to
determine whether the player can send an invite, as this ability may vary
depending on the platform or player.
See Player Invite Prompts for more details on implementing invite prompts, customizing prompts and notifications, and using launch data.
| Name | Type | Default | Description |
|---|---|---|---|
player | Instance | The Player to prompt with the invite popup. | |
experienceInviteOptions | Instance | nil | Optional ExperienceInviteOptions object for customizing the
prompt. |
Returns
()
PromptLinkSharing(player: Player, options: Dictionary = nil): Tuple#
YieldsDeprecatedDeprecated
Deprecated. Use
PromptLinkSharingAsync()
instead.
| Name | Type | Default | Description |
|---|---|---|---|
player | Player | Prompts the given Player with a Roblox platform-level share
sheet with a generated share link. | |
options | Dictionary | nil |
|
Returns
Tuple— A tuple containing anPromptLinkSharingResultindicating the result of the link sharing prompt.
PromptLinkSharingAsync(player: Player, options: Dictionary = nil): Tuple#
Yields
This call is restricted to server scripts. After a link is successfully generated, the target player will either be prompted to open a share sheet with the generated link, or the link will be copied directly to the clipboard if share sheet functionality is not available to the player.
| Name | Type | Default | Description |
|---|---|---|---|
player | Player | Prompts the given Player with a Roblox platform-level share
sheet with a generated share link. | |
options | Dictionary | nil |
|
Returns
Tuple— A tuple containing anPromptLinkSharingResultindicating the result of the link sharing prompt.
PromptPhoneBook(player: Instance, tag: string): ()#
Prompts the given Player with the phone book. If the player
chooses to call someone, the
CallInviteStateChanged event
fires. You should use
CanSendCallInviteAsync()
prior to calling PromptPhoneBook()
since the ability to see the phone book may vary depending on the player.
If a player is not eligible to open the phone book, an error dialog is shown.
| Name | Type | Default | Description |
|---|---|---|---|
player | Instance | The player to prompt with the phone book. | |
tag | string | String to help differentiate between various phone book "entry points" or similar. For example, you can pass a string defining what region of an experience the calling player's character is currently in. |
Returns
()
PromptRsvpToEventAsync(eventId: string): RsvpStatus#
Yields
PromptRsvpToEventAsync() displays a prompt to the local player through
which they may change their RSVP status to the given event.
Events must be in the current experience and must not have already started. If the event has already started, this method will return an error.
Note that you can use
GetEventRsvpStatusAsync()
to check the player's current RSVP status before calling this method.
| Name | Type | Default | Description |
|---|---|---|---|
eventId | string | The event ID of the event to prompt the player to change their RSVP status for. This must be a valid event ID that exists in the current experience, represented as a string (not a number). |
Returns
RsvpStatus— Returns aRsvpStatusindicating the player's new RSVP status after the prompt is closed. If the player closes the prompt without changing their RSVP status, this will returnRsvpStatus.Noneor their oldRsvpStatusif they had already selected a status.
ShowSelfView(selfViewPosition: SelfViewPosition = LastPosition): ()#
Shows the calling player's self view. If this method is called while the self view is already visible, it does nothing.
| Name | Type | Default | Description |
|---|---|---|---|
selfViewPosition | SelfViewPosition | LastPosition | The position to place the self view . |
Returns
()
Events 4#
| CallInviteStateChanged | Fires when a player's call invite state changes. |
| GameInvitePromptClosed | Fires when a player closes an invite prompt. |
| PhoneBookPromptClosed | Fires when a player closes the phone book prompt. |
| ShareSheetClosed | Fires when the player closes the share sheet opened by
PromptLinkSharingAsync(). |
CallInviteStateChanged(player: Instance, inviteState: InviteState)#
This event fires when a player's call invite state changes.
| Name | Type | Default | Description |
|---|---|---|---|
player | Instance | The Player instance of the player who had a call invite state
change. | |
inviteState | InviteState | The new call invite state. |
GameInvitePromptClosed(player: Instance, recipientIds: Array)#
This event fires when a player closes an invite prompt.
PhoneBookPromptClosed(player: Instance)#
Fires when a player closes the phone book prompt.
Callbacks 1#
| OnCallInviteInvoked | Callback for when a call is placed from the phone book. |
OnCallInviteInvoked(tag: string, callParticipantIds: Array): Instance#
A callback to process when a call is placed from the phone book. The tag
parameter can be used to differentiate between different "entry points" or
similar, as described in
PromptPhoneBook(). Only one
callback can be set.
| Name | Type | Default | Description |
|---|---|---|---|
tag | string | String to help differentiate between various phone book entry points. | |
callParticipantIds | Array | Array containing all of the players involved in the call. The caller will always be the first player in the array. |
Returns
Instance— Table including thePlaceIdandReservedServerAccessCodekeys whose values are theDataModel.PlaceIdand the server access code returned byTeleportService:ReserveServerAsync(), respectively.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild