1. Valid Parent Types for ProximityPrompt
ProximityPrompts must be children of one of a few specific objects. If you try to drop a prompt on a non‑part container or a Group, it will never render. The allowed parents are:
- Attachment – the most common container for prompts on a part.
- BasePart – the prompt can live directly on a part itself.
- Model whose PrimaryPart is set – this lets you group several objects while still allowing the prompt to appear.
2. Triggering a Prompt with Zero HoldDuration
When the HoldDuration property is set to 0, the prompt’s action fires immediately once the designated key is pressed. This is the lightweight way to open a sliding door or activate a switch. The E‑Key Sliding Door tutorial demonstrates this exact configuration, explicitly setting HoldDuration to 0 so that players can toggle the door instantly[2].
3. Common Scripted Mistakes
Scripts that disable or destroy prompts during runtime will hide interaction until the script changes state again. Scripts that modify the prompt after the door’s state has changed (for example, toggling the ActionText or Enabled flag) should perform these updates only after the door’s animation has finished. The example script in the E‑Key tutorial shows how to safely connect the Triggered event and toggle the door’s position while keeping the prompt visible throughout the transition.
4. Debugging Checklist
- Verify the prompt’s parent object type.
- Confirm the prompt’s ObjectText, ActionText, and KeyboardKeyCode are correctly set.
- Ensure HoldDuration matches the desired trigger behaviour.
- In Play mode, enable Studio’s Prompt Transparency to visualize the prompt’s placement.
- Watch the Triggered event in a script or use a print statement to confirm the prompt is firing.
- Can I place a ProximityPrompt on a Group? No, Groups are not allowed parents.
- What happens if the door part moves? The prompt’s Attachment must be updated to stay attached, or the prompt will drift.
- Can multiple prompts exist on the same door? Yes, use separate Attachments and distinct ObjectText values.
[1]: https://create.roblox.com/docs/referenc ... mityPrompt
[2]: viewtopic.php?t=6142
Sources and verification
- ProximityPrompt API Reference — Lists supported parents and properties of ProximityPrompt objects
- E‑Key Sliding Door Forum Tutorial — Demonstrates PromptAttachment placement, property settings, and zero‑duration HoldDuration behavior