Skip to content

Service · inherits Instance

SocialService

Official docs ↗

Facilitates social functions that impact relationships made on the Roblox platform.

About SocialService

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 14

  • CanSendCallInviteAsync(player: Instance) → booleanYieldsIndicates whether the given Player can invite other players to a call.

    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.

  • CanSendGameInviteAsync(player: Instance, recipientId: User = U1.AQAAAAAAAAAAAAAAAAAAAAA) → booleanYieldsIndicates whether the given Player can invite other players.

    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.

  • GetEventRsvpStatusAsync(eventId: string) → RsvpStatusYieldsReturns the local player's RSVP status for the given event.

    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.

  • GetExperienceEventAsync(eventId: string) → ExperienceEvent?YieldsReturns details for the specified experience event or nil if it is unavailable.

    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 (RsvpStatus or nil)

    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 <status> message if the service returns an unexpected error code.

  • GetPartyAsync(partyId: string) → ArrayYieldsReturns an array of dictionaries containing data for all members of the specified party who are currently in the experience.

    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:

    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.

  • GetPlayersByPartyId(partyId: string) → List<Player>Returns a table of all presently connected Player objects whose Player.PartyId property matches the passed partyId.

    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.

  • GetUpcomingExperienceEventsAsync() → List<ExperienceEvent>YieldsReturns active and upcoming experience events for the current experience.

    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 <status> message if the service returns an unexpected error code.

  • HideSelfView() → ()Hides the calling player's self view.

    Hides the calling player's self view. If this method is called while the self view is already hidden, it does nothing.

  • PromptFeedbackSubmissionAsync(options: Dictionary?) → ()YieldsPrompts the player to submit feedback or a player support ticket about the current experience.

    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:

    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.
  • PromptGameInvite(player: Instance, experienceInviteOptions: Instance = nil) → ()Prompts the given Player with the invite screen.

    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.

  • PromptLinkSharingAsync(player: Player, options: Dictionary = nil) → TupleYieldsGenerates an expiring share link and prompts the given Player with the platform share sheet.

    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.

  • PromptPhoneBook(player: Instance, tag: string) → ()Prompts the given Player with the phone book.

    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.

  • PromptRsvpToEventAsync(eventId: string) → RsvpStatusYieldsPrompts the local Player with a prompt to change their RSVP status to the given event.

    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.

  • ShowSelfView(selfViewPosition: SelfViewPosition = LastPosition) → ()Shows the calling player's self view.

    Shows the calling player's self view. If this method is called while the self view is already visible, it does nothing.

Events 4

  • CallInviteStateChangedSocialService.CallInviteStateChanged:Connect(function(player, inviteState))Fires when a player's call invite state changes.

    This event fires when a player's call invite state changes.

  • GameInvitePromptClosedSocialService.GameInvitePromptClosed:Connect(function(player, recipientIds))Fires when a player closes an invite prompt.

    This event fires when a player closes an invite prompt.

  • PhoneBookPromptClosedSocialService.PhoneBookPromptClosed:Connect(function(player))Fires when a player closes the phone book prompt.
  • ShareSheetClosedSocialService.ShareSheetClosed:Connect(function(player))Fires when the player closes the share sheet opened by PromptLinkSharingAsync().

    Fires on the server when the player closes or dismisses the platform share sheet that was opened as a result of a successful call to PromptLinkSharingAsync(). The player argument is the Player who closed the share sheet.

Callbacks 1

  • OnCallInviteInvoked(tag: string, callParticipantIds: Array) → InstanceCallback for when a call is placed from the phone book.

SocialService also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.