Reference API Roblox

Engine API

Website

Related

Reference API Roblox

SocialService

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

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service, NotReplicated]

Member index 26

HistoryMember
600CanSendCallInviteAsync(player: Instance): bool
549CanSendGameInviteAsync(player: Instance, recipientId: int64 = 0): bool
677GetEventRsvpStatusAsync(eventId: string): RsvpStatus
669GetPartyAsync(partyId: string): Array
665GetPlayersByPartyId(partyId: string): Instances
583HideSelfView(): null
573InvokeGameInvitePromptClosed(player: Instance, recipientIds: Array): null
598InvokeIrisInvite(player: Instance, tag: string, irisParticipants: Array): null
577InvokeIrisInvitePromptClosed(player: Instance): null
573PromptGameInvite(player: Instance, experienceInviteOptions: Instance = Instance): null
600PromptPhoneBook(player: Instance, tag: string): null
677PromptRsvpToEventAsync(eventId: string): RsvpStatus
677PromptRsvpToEventCompleted(eventId: string, success: bool, rsvpStatus: RsvpStatus): null
583ShowSelfView(selfViewPosition: SelfViewPosition = LastPosition): null
677UpdatePlayerPartyData(partyId: string): null
600CallInviteStateChanged(player: Instance, inviteState: InviteState)
462GameInvitePromptClosed(player: Instance, recipientIds: Array)
600PhoneBookPromptClosed(player: Instance)
677PlayerPartyDataChanged(partyId: string)
550PromptInviteRequested(player: Instance, experienceInviteOptions: Instance)
577PromptIrisInviteRequested(player: Instance, tag: string)
583SelfViewHidden()
583SelfViewVisible(selfViewPosition: SelfViewPosition)
677ShowPromptRsvpToEvent(eventId: string)
600OnCallInviteInvoked(tag: string, callParticipantIds: Array): Instance
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
670Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 11

HistoryMember
602CanSendIrisInviteAsync(player: Instance): bool
602PromptIrisInvite(player: Instance, tag: string): null
282SetBestFriendUrl(bestFriendUrl: string): void
282SetFriendUrl(friendUrl: string): void
282SetGroupRankUrl(groupRankUrl: string): void
282SetGroupRoleUrl(groupRoleUrl: string): void
282SetGroupUrl(groupUrl: string): void
282SetPackageContentsUrl(stuffUrl: string): void
282SetStuffUrl(stuffUrl: string): void
602IrisInvitePromptClosed(player: Instance)
602OnIrisInviteInvoked(tag: string, irisParticipantIds: Array): Instance

Description

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.

History 68

Members 26

CallInviteStateChanged

Parameters (2)
playerInstance
inviteStateInviteState

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

History 1

CanSendCallInviteAsync

Parameters (1)
playerInstance
Returns (1)
bool

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.

See Roblox Connect for a sample implementation of this method.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

CanSendGameInviteAsync

Parameters (2)Default
playerInstance
recipientIdint640
Returns (1)
bool

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.

This function yields. It will block the calling thread until completion.

History 3

Tags: [Yields]

GameInvitePromptClosed

Parameters (2)
playerInstance
recipientIdsArray

This event fires when a player closes an invite prompt.

History 2

GetEventRsvpStatusAsync

Parameters (1)
eventIdstring
Returns (1)
RsvpStatus
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

GetPartyAsync

Parameters (1)
partyIdstring
Returns (1)
Array

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:

KeyValue TypeDescription
UserIdnumberThe player's Player.UserId property.
PlaceIdnumberThe DataModel.PlaceId of the place the party member is currently in.
JobIdstringThe DataModel.JobId of the server instance the user currently resides in.
PrivateServerIdstringIf applicable, the DataModel.PrivateServerId when the party member is in a private or reserved server.
ReservedServerAccessCodestringIf applicable, the access code for the reserved server that the user currently resides in. Useful for teleporting party members to each other using TeleportService:TeleportAsync().

Note that this service does not work during playtesting in Roblox Studio; to test aspects of your experience using it, you must publish the experience and play it in the Roblox application.

This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

GetPlayersByPartyId

Parameters (1)
partyIdstring
Returns (1)
Instances

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.

Note that this service does not work during playtesting in Roblox Studio; to test aspects of your experience using it, you must publish the experience and play it in the Roblox application.

History 1

HideSelfView

Parameters (0)
No parameters.
Returns (1)
null

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

History 1

InvokeGameInvitePromptClosed

Parameters (2)
playerInstance
recipientIdsArray
Returns (1)
null

History 3

InvokeIrisInvite

Parameters (3)
playerInstance
tagstring
irisParticipantsArray
Returns (1)
null

History 2

InvokeIrisInvitePromptClosed

Parameters (1)
playerInstance
Returns (1)
null

History 1

OnCallInviteInvoked

Parameters (2)
tagstring
callParticipantIdsArray
Returns (1)
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.

History 1

PhoneBookPromptClosed

Parameters (1)
playerInstance

Fires when a player closes the phone book prompt.

History 1

PlayerPartyDataChanged

Parameters (1)
partyIdstring

History 3

PromptGameInvite

Parameters (2)Default
playerInstance
experienceInviteOptionsInstanceInstance
Returns (1)
null

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.

History 4

PromptInviteRequested

Parameters (2)
playerInstance
experienceInviteOptionsInstance

History 3

PromptIrisInviteRequested

Parameters (2)
playerInstance
tagstring

History 1

PromptPhoneBook

Parameters (2)
playerInstance
tagstring
Returns (1)
null

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.

See Roblox Connect for a sample implementation of this method.

History 1

PromptRsvpToEventAsync

Parameters (1)
eventIdstring
Returns (1)
RsvpStatus
This function yields. It will block the calling thread until completion.

History 1

Tags: [Yields]

PromptRsvpToEventCompleted

Parameters (3)
eventIdstring
successbool
rsvpStatusRsvpStatus
Returns (1)
null

History 1

SelfViewHidden

Parameters (0)
No parameters.

History 1

SelfViewVisible

Parameters (1)
selfViewPositionSelfViewPosition

History 1

ShowPromptRsvpToEvent

Parameters (1)
eventIdstring

History 1

ShowSelfView

Parameters (1)Default
selfViewPositionSelfViewPositionLastPosition
Returns (1)
null

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

History 1

UpdatePlayerPartyData

Parameters (1)
partyIdstring
Returns (1)
null

History 3

Removed members 11

CanSendIrisInviteAsync

Parameters (1)
playerInstance
Returns (1)
bool
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

IrisInvitePromptClosed

Parameters (1)
playerInstance

History 2

OnIrisInviteInvoked

Parameters (2)
tagstring
irisParticipantIdsArray
Returns (1)
Instance

History 2

PromptIrisInvite

Parameters (2)
playerInstance
tagstring
Returns (1)
null

History 2

SetBestFriendUrl

Parameters (1)
bestFriendUrlstring
Returns (1)
void

History 4

SetFriendUrl

Parameters (1)
friendUrlstring
Returns (1)
void

History 4

SetGroupRankUrl

Parameters (1)
groupRankUrlstring
Returns (1)
void

History 4

SetGroupRoleUrl

Parameters (1)
groupRoleUrlstring
Returns (1)
void

History 4

SetGroupUrl

Parameters (1)
groupUrlstring
Returns (1)
void

History 4

SetPackageContentsUrl

Parameters (1)
stuffUrlstring
Returns (1)
void

History 4

SetStuffUrl

Parameters (1)
stuffUrlstring
Returns (1)
void

History 4

Settings