ADVERTISEMENTREMOVE ADS
Game icon

No hold duration Open Source

Script preview thumbnail
Script Preview

Description

[+] It makes Proximity Prompt's Hold Duration = 0

Features:

  • makes Proximity Prompt's Hold Duration = 0

Tested with

ADVERTISEMENTREMOVE ADS
49 Lines • 1.48 KiB
Raw
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local proximityPromptService = game:GetService("ProximityPromptService")
-- Function to set up ProximityPrompts
local function setupProximityPrompt(prompt)
if prompt:IsA("ProximityPrompt") then
-- Set HoldDuration to 0 when it's enabled (i.e., when you get close)
prompt:GetPropertyChangedSignal("Enabled"):Connect(function()
if prompt.Enabled then
prompt.HoldDuration = 0
end
end)
-- Ensure it's already set if enabled
if prompt.Enabled then
prompt.HoldDuration = 0
end
end
end
-- Check proximity to ProximityPrompts
local function checkProximity()
while true do
local closestPrompt = nil
local closestDistance = math.huge
for _, descendant in ipairs(workspace:GetDescendants()) do
if descendant:IsA("ProximityPrompt") and descendant.Enabled then
local distance = (character.HumanoidRootPart.Position - descendant.Parent.Position).magnitude
if distance < closestDistance then
closestDistance = distance
closestPrompt = descendant
end
end
end
if closestPrompt and closestDistance < 10 then -- Adjust the distance threshold as needed
setupProximityPrompt(closestPrompt)
end
wait(0.5) -- Check every 0.5 seconds for nearby prompts
end
end
-- Start checking for proximity prompts when the character is added or respawned
character:WaitForChild("HumanoidRootPart")
checkProximity()
ADVERTISEMENTREMOVE ADS

Comments

3 comments
to add a comment
Ju

Did you made this script out of chatgpt???

0
0
Sk

No, just told chat gpt to add the comments

0
0
no

@Skibdialpharizz CAPPP U USED AI

0
0
ADVERTISEMENTREMOVE ADS