fireproximityprompt
Instantly trigger a ProximityPrompt, bypassing HoldDuration and distance.
function fireproximityprompt(prompt: ProximityPrompt): ()Synopsis
How it works
Programmatically triggers a
ProximityPrompt as if the local player walked into range and held the key/button. Internally fires the prompt’s Triggered event on the client, which may replicate the interaction to the server depending on the prompt’s Hold Duration and server-side validation.Server-side caveats
Many games validate proximity prompts server-side by checking the player’s distance to the prompt’s parent Part. Firing a prompt while far away can result in the server ignoring the trigger or flagging the player. Combine with teleportation or distance-based checks for reliable use.
Usage
Auto-trigger first ProximityPrompt in workspace
local prompt = workspace:FindFirstChildWhichIsA("ProximityPrompt", true)
if prompt then
fireproximityprompt(prompt)
print("Fired:", prompt.ActionText)
endParameters
prompt ProximityPrompt The ProximityPrompt instance to trigger.
Avoid Luau re-implementation
Do not reimplement this in Luau — it creates easy detection vectors. Always use the built-in executor version.