fireproximityprompt Synchronous
Trigger a ProximityPrompt immediately through the host interaction path. Use it with a prompt that exists in the active scene.
Luau
fireproximityprompt(prompt: ProximityPrompt, ...ignored: any) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
prompt | ProximityPrompt | ProximityPrompt to trigger. |
...ignored | any | Additional arguments are ignored in this build. |
Returns
()No values.
Usage notes
The function validates the exact ProximityPrompt class. It raises if the native trigger is unavailable.
Example
Luau
local part = Instance.new("Part")
part.Parent = workspace
local prompt = Instance.new("ProximityPrompt")
prompt.Parent = part
local ok, reason = pcall(fireproximityprompt, prompt)
if not ok then print("Prompt unavailable:", reason) end
part:Destroy()