ReferenceInstances

setproximitypromptduration

Writes the prompt’s HoldDuration.

Syntax

setproximitypromptduration(prompt: ProximityPrompt, duration: number) -> ()

Parameters

ParameterTypeDescription
promptProximityPromptPrompt to change.
durationnumberNew hold duration in seconds.

Description

This changes the local prompt property and does not itself trigger the prompt or override server validation. Pass a valid nonnegative duration.

Example

local prompt = Instance.new("ProximityPrompt")
setproximitypromptduration(prompt, 0.5)
print(prompt.HoldDuration)
prompt:Destroy()

These are Game executor contracts. Check build requirements and session lifetimes before using them.