Allows developers to interact with ProximityPrompt objects in a global
way.
It is a singleton that may be acquired with GetService.
It is not visible in Studio's object browser.
Tags: [Service, NotBrowsable]
History Member 731 Enabled : bool 731 MaxIndicatorsVisible : int 731 MaxPromptsVisible : int 685 IndicatorHidden ( prompt: ProximityPrompt ) 685 IndicatorShown ( prompt: ProximityPrompt ) 483 PromptButtonHoldBegan ( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483 PromptButtonHoldEnded ( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483 PromptHidden ( prompt: ProximityPrompt ) 483 PromptShown ( prompt: ProximityPrompt , inputType: ProximityPromptInputType ) 483 PromptTriggerEnded ( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483 PromptTriggered ( prompt: ProximityPrompt , playerWhoTriggered: Player ) 68 members inherited from Instance731 Archivable : bool 731 Attributes : string 731 AttributesReplicate : string 731 AttributesSerialize : BinaryString 731 Capabilities : SecurityCapabilities 731 DataCost : int 731 DefinesCapabilities : bool 731 HistoryId : UniqueId 731 IsInSandbox : bool 731 Name : string 731 Parent : Instance 731 PredictionMode : PredictionMode 731 PropertyStatusStudio : PropertyStatus 731 RobloxLocked : bool 731 Sandboxed : bool 731 SourceAssetId : int64 731 Tags : SharedString 731 UniqueId : UniqueId 731 archivable : bool 731 numExpectedDirectChildren : int 576 AddTag ( tag: string ) : null 573 ClearAllChildren ( ) : null 462 Clone ( ) : Instance 573 Destroy ( ) : null 486 FindFirstAncestor ( name: string ) : Instance 486 FindFirstAncestorOfClass ( className: string ) : Instance 486 FindFirstAncestorWhichIsA ( className: string ) : Instance 486 FindFirstChild ( name: string , recursive: bool = false ) : Instance 486 FindFirstChildOfClass ( className: string ) : Instance 486 FindFirstChildWhichIsA ( className: string , recursive: bool = false ) : Instance 486 FindFirstDescendant ( name: string ) : Instance 563 GetActor ( ) : Actor 486 GetAttribute ( attribute: string ) : Variant 462 GetAttributeChangedSignal ( attribute: string ) : RBXScriptSignal 631 GetAttributes ( ) : Dictionary 648 GetChildren ( ) : Instances 462 GetDebugId ( scopeLength: int = 4 ) : string 707 GetDescendants ( ) : Instances 486 GetFullName ( ) : string 706 GetStyled ( name: string , selector: string? ) : Variant 657 GetStyledPropertyChangedSignal ( property: string ) : RBXScriptSignal 576 GetTags ( ) : Array 576 HasTag ( tag: string ) : bool 486 IsAncestorOf ( descendant: Instance ) : bool 486 IsDescendantOf ( ancestor: Instance ) : bool 664 IsPropertyModified ( property: string ) : bool 698 QueryDescendants ( selector: string ) : Instances 573 Remove ( ) : null 576 RemoveTag ( tag: string ) : null 664 ResetPropertyToDefault ( property: string ) : null 573 SetAttribute ( attribute: string , value: Variant ) : null 462 WaitForChild ( childName: string , timeOut: double ) : Instance 731 children ( ) : Instances 731 clone ( ) : Instance 731 destroy ( ) : null 731 findFirstChild ( name: string , recursive: bool = false ) : Instance 731 getChildren ( ) : Instances 731 isDescendantOf ( ancestor: Instance ) : bool 731 remove ( ) : null 462 AncestryChanged ( child: Instance , parent: Instance ) 462 AttributeChanged ( attribute: string ) 462 ChildAdded ( child: Instance ) 462 ChildRemoved ( child: Instance ) 462 DescendantAdded ( descendant: Instance ) 462 DescendantRemoving ( descendant: Instance ) 500 Destroying ( ) 657 StyledPropertiesChanged ( ) 731 childAdded ( child: Instance ) 6 members inherited from Object731 ClassName : string 731 className : string 647 GetPropertyChangedSignal ( property: string ) : RBXScriptSignal 647 IsA ( className: string ) : bool 731 isA ( className: string ) : bool 647 Changed ( property: string )
ProximityPromptService allows developers to interact with
ProximityPrompt objects in a global way. It may be more convenient to
listen to events through this service rather than on individual
ProximityPrompt objects.
731
Change Default of MaxPromptsVisible
from
to
16 731
Change Default of MaxIndicatorsVisible
from
to
16 731
Change Default of Enabled
from
to
true 726
Change Default of MaxPromptsVisible
from
16
to
726
Change Default of MaxIndicatorsVisible
from
16
to
726
Change Default of Enabled
from
true
to
685
Add IndicatorShown685
Add IndicatorHidden685
Add MaxIndicatorsVisible553
Change Default of MaxPromptsVisible
from
to
16 553
Change Default of Enabled
from
to
true 486
Change ThreadSafety of MaxPromptsVisible
from
ReadOnly
to
ReadSafe 486
Change ThreadSafety of Enabled
from
ReadOnly
to
ReadSafe 483
Change Parameters of PromptTriggered
from
( prompt: Instance , playerWhoTriggered: Instance )
to
( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483
Change Parameters of PromptTriggerEnded
from
( prompt: Instance , playerWhoTriggered: Instance )
to
( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483
Change Parameters of PromptShown
from
( prompt: Instance , inputType: ProximityPromptInputType )
to
( prompt: ProximityPrompt , inputType: ProximityPromptInputType ) 483
Change Parameters of PromptHidden
from
( prompt: Instance )
to
( prompt: ProximityPrompt ) 483
Change Parameters of PromptButtonHoldEnded
from
( prompt: Instance , playerWhoTriggered: Instance )
to
( prompt: ProximityPrompt , playerWhoTriggered: Player ) 483
Change Parameters of PromptButtonHoldBegan
from
( prompt: Instance , playerWhoTriggered: Instance )
to
( prompt: ProximityPrompt , playerWhoTriggered: Player ) 462
Change ThreadSafety of PromptTriggered
from
to
Unsafe 462
Change ThreadSafety of PromptTriggerEnded
from
to
Unsafe 462
Change ThreadSafety of PromptShown
from
to
Unsafe 462
Change ThreadSafety of PromptHidden
from
to
Unsafe 462
Change ThreadSafety of PromptButtonHoldEnded
from
to
Unsafe 462
Change ThreadSafety of PromptButtonHoldBegan
from
to
Unsafe 462
Change ThreadSafety of MaxPromptsVisible
from
to
ReadOnly 462
Change ThreadSafety of Enabled
from
to
ReadOnly 458
Change Parameters of PromptButtonHoldEnded
from
( prompt: Instance )
to
( prompt: Instance , playerWhoTriggered: Instance ) 458
Change Parameters of PromptButtonHoldBegan
from
( prompt: Instance )
to
( prompt: Instance , playerWhoTriggered: Instance ) 454
Add PromptTriggered454
Add PromptTriggerEnded454
Add PromptShown454
Add PromptHidden454
Add PromptButtonHoldEnded454
Add PromptButtonHoldBegan454
Add MaxPromptsVisible454
Add Enabled454
Add ProximityPromptServiceThis property determines whether ProximityPrompts
are enabled, and therefore shown, in-experience. When false, no prompts
will be shown.
For example, in a round-based system, you can disable prompts at certain
points in the experience to disable proximity-based interactions:
History 6 This event triggers client-side in connected local scripts when the
indicator for a ProximityPrompt is no longer visible, such as when
the player moves outside the prompt's
MaxIndicatorDistance or the
prompt is disabled. It is the counterpart to
IndicatorShown and is
convenient for tearing down custom indicator UI globally rather than
connecting to each individual ProximityPrompt .
History 1 This event triggers client-side in connected local scripts when the
indicator for a ProximityPrompt becomes visible, which happens
when the player moves within the prompt's
MaxIndicatorDistance but
remains outside its
MaxActivationDistance .
Indicators are opt-in: a prompt only shows one when its
MaxIndicatorDistance is set
greater than 0 (the default of 0 disables the indicator). Listening on
the service rather than on each ProximityPrompt is convenient when
implementing custom indicator UI globally.
History 1 This property sets the maximum number of prompt indicators that can be
visible at the same time. Indicators are lightweight distance hints shown
for ProximityPrompts when the player is within the
prompt's MaxIndicatorDistance
but still outside its
MaxActivationDistance .
This property defaults to 16 and is clamped to the range [0, 64].
Because indicators are opt-in per prompt — a prompt's
MaxIndicatorDistance defaults
to 0, which disables its indicator — this property has no visible effect
unless at least one prompt sets a non-zero
MaxIndicatorDistance .
History 3 This property indicates the maximum number of
ProximityPrompts that will be shown to the player.
History 6 This event triggers client-side in connected local scripts when a prompt
becomes hidden.
History 3 This event triggers client-side in connected local scripts when a prompt
becomes visible.
History 3 This event triggers when the player stops holding down the
KeyboardKeyCode key/button while
triggering a prompt. This is intended to allow interactions which require
the player to hold a key/button while something happens in-experience.
History 3 This event triggers when the player completes interaction with a prompt,
either when the KeyboardKeyCode
key/button is pressed, or after a specified amount of time holding the
key/button if the prompt's
HoldDuration is non-zero.
History 3