---
title: Proximity prompts
description: Proximity Prompts allow users to trigger actions when they approach objects in the 3D space.
---
`Class.ProximityPrompt` objects
encourage user interaction to trigger an action when they approach in-experience
objects such as doors, light switches, and buttons. Using this object, you can:
- Indicate what objects a user can interact with in the experience.
- Display the action a user can take on the object, then trigger the action through user input such as pressing or holding a key.
- Display the correct input for all input types, such a keyboard, gamepad, and touchscreen keys.
## Customize proximity prompts
You can customize a proximity prompt based on how you want it to [appear](#appearance), when you want it to be [visible](#visibility), and what you want a user to do to [trigger the action](#interactivity).
### Appearance
Proximity prompts need to communicate three things:
- The **object** that a user can interact with.
- The **action** that triggers when they interact with the proximity
prompt.
- The **key** that a user must press or hold.
You can specify these through the following properties:
- `Class.ProximityPrompt.ObjectText|ObjectText` An optional name for the object a user can interact with.
- `Class.ProximityPrompt.ActionText|ActionText` An optional name for the action a user will trigger.
- `Class.ProximityPrompt.KeyboardKeyCode|KeyboardKeyCode` The keyboard key a user must press or hold to trigger the action.
- `Class.ProximityPrompt.GamepadKeyCode|GamepadKeyCode` The gamepad key a user must press or hold to trigger the action.
### Visibility
You can control when the proximity prompt is visible through its `Class.ProximityPrompt.MaxActivationDistance|MaxActivationDistance`, `Class.ProximityPrompt.RequiresLineOfSight|RequiresLineOfSight`, and `Class.ProximityPrompt.Exclusivity|Exclusivity` properties.
#### MaxActivationDistance
The `Class.ProximityPrompt.MaxActivationDistance|MaxActivationDistance` property allows you to define the range from around the `Class.ProximityPrompt` object that activates the visibility of the proximity prompt. Once a user's character enters that range, the proximity prompt becomes visible.
#### RequiresLineOfSight
The `Class.ProximityPrompt.RequiresLineOfSight|RequiresLineOfSight` property activates the visibility of the proximity prompt when there's a clear path from the **camera** to the `Class.ProximityPrompt` object. By default, this property is set to true.
#### Exclusivity
If a user's character is within range of multiple proximity prompts, each proximity prompt's visibility depends on which proximity prompt the camera is pointing at, as well as each proximity prompt's `Class.ProximityPrompt|Exclusivity` property value.
| Event | Description |
|---|---|
| `Class.ProximityPromptService.PromptTriggered|PromptTriggered` | Fires when a player interacts with a proximity prompt (after the duration for a prompt with non-zero `Class.ProximityPrompt.HoldDuration|HoldDuration`). |
| `Class.ProximityPromptService.PromptTriggerEnded|PromptTriggerEnded` | Triggers when the player stops interacting with a proximity prompt. |
| `Class.ProximityPromptService.PromptButtonHoldBegan|PromptButtonHoldBegan` | Fires when a player begins interacting with a proximity prompt with a non-zero `Class.ProximityPrompt.HoldDuration|HoldDuration` value. |
| `Class.ProximityPromptService.PromptButtonHoldEnded|PromptButtonHoldEnded` | Fires when a player stops interacting with a proximity prompt with a non-zero `Class.ProximityPrompt.HoldDuration|HoldDuration` value. |
| `Class.ProximityPromptService.PromptShown|PromptShown` | Triggers in `Class.LocalScript|LocalScripts` when a proximity prompt is made visible. |
| `Class.ProximityPromptService.PromptHidden|PromptHidden` | Triggers in `Class.LocalScript|LocalScripts` when a prompt is hidden. |