fireproximityprompt Synchronous

Trigger a ProximityPrompt immediately through the host interaction path. Use it with a prompt that exists in the active scene.

Syntax
Luau
fireproximityprompt(prompt: ProximityPrompt, ...ignored: any) -> ()

Parameters

Function parameters
ParameterTypeDescription
promptProximityPromptProximityPrompt to trigger.
...ignoredanyAdditional 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

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()
Kawaii documentation