Im making game when you hold E by 4 sec you can sell this and get Coins and you can for Coins upgrade you stuff and im dont know how to change ProximityPrompt Hold Duration In game beacuse i CANT i can only Off game change hold duration pls help i need SCRIPT when you buy item you hold duration time is shorter 2 times and idk how to make this actually code bellow:
local ProximityPrompt = script.Parent.ProximityPrompt local Player = game.Players.LocalPlayer
while wait() do ProximityPrompt.HoldDuration = Player.DestroyTime.Value end
There's a property inside of Proximity Prompts called "HoldDuration" which you can change before the game even runs.
Helpful links:
https://developer.roblox.com/en-us/api-reference/class/ProximityPrompt
https://developer.roblox.com/en-us/api-reference/property/ProximityPrompt/HoldDuration
You can just change the Hold Duration by this line of code.
ProximityPrompt.HoldDuration = ProximityPrompt.HoldDuration / 2
Add that line of code to the function that gets called when the "Shorter HoldDuration item" is bought.