Change proximityPrompts HoldDuration using another proximityPrompt

Hey there, I was wondering if it’s possible to set a ProximityPrompts HoldDuration to a value. The value being 10 for example. Then using a different ProximityPrompt (or a script) to alter that value so that the other ProximityPrompts HoldDuration changes.
Any ideas on how to do this?

Thank you,
sam

1 Like

Just listen for the Triggered event on the 1st prompt and then change the HoldDuration on the second prompt using the HoldDuration property

ProximityPrompt.Triggered:Connect(function()
   otherProximityPrompt.HoldDuration = --number
end)

Can you do some basic research before posting please. Not trying to sound rude

Sorry I realised I should’ve specified way more. Basically I was wondering if it’s possible to set a ProximityPrompts HoldDuration to a value. The value being 10 for example. Then using a different ProximityPrompt altering that value so that the other ProximityPrompts HoldDuration changes.

Yes, it’s very much possible to change multiple other proximity prompts values. Without needing to change one and then other’s listen to the change.

How exactly do I do that? I tried using an Int Value and then reducing the value by 1 but it didn’t work.

Still using the same code i posted but changing the property in a for loop

ProximityPrompt.Triggered:Connect(function()
   for _, prompt in arrayOfPrompts do --array of prompts is a table of all the proximity prompts you want the property changed
      prompt.HoldDuration = --number
   end
end)