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 18

HistoryMember
600CanSendCallInviteAsync(player: Instance): bool
549CanSendGameInviteAsync(player: Instance, recipientId: int64 = 0): bool
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
583ShowSelfView(selfViewPosition: SelfViewPosition = LastPosition): null
600CallInviteStateChanged(player: Instance, inviteState: InviteState)
462GameInvitePromptClosed(player: Instance, recipientIds: Array)
600PhoneBookPromptClosed(player: Instance)
550PromptInviteRequested(player: Instance, experienceInviteOptions: Instance)
577PromptIrisInviteRequested(player: Instance, tag: string)
583SelfViewHidden()
583SelfViewVisible(selfViewPosition: SelfViewPosition)
600OnCallInviteInvoked(tag: string, callParticipantIds: Array): Instance
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: 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
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: 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()
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 56

Members 18

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

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

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

SelfViewHidden

Parameters (0)
No parameters.

History 1

SelfViewVisible

Parameters (1)
selfViewPositionSelfViewPosition

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

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