getproximitypromptduration Synchronous
Read how long the player must hold a ProximityPrompt before it triggers. Use it before a temporary change so the original duration can be restored.
Luau
getproximitypromptduration(prompt: ProximityPrompt) -> numberParameters
| Parameter | Type | Description |
|---|---|---|
prompt | ProximityPrompt | ProximityPrompt to inspect. |
Returns
numberThe prompt’s HoldDuration in seconds.
Usage notes
The wrapper reads the regular HoldDuration property and rejects non-prompt Instances.
Example
Luau
local prompt = Instance.new("ProximityPrompt")
print("Hold for", getproximitypromptduration(prompt), "seconds")
prompt:Destroy()