How to detect when someone finishes a hold proximity prompt

Hello! Im having trouble with a system! Is it possible to detect when someone Finishes a proximity prompt, like when the 5 seconds of holding the proximity prompt end?
And i need it thru local and proximity service!

ProxyService.PromptTriggered:Connect(function()
end)

This doesnt work, because it activates when i just click on it!

ProxyService.PromptTriggerEnded:Connect(function()
end)

This just detects when you stop holding the prompt!

Does anyone know about this and how to make it work?

Prompt.Triggered:Connect() should be what you are looking for, its an event that fires every time someone successfully holds the prompt down for the time set.

yeah but i am currently using it on proximity service

huh thats odd, from looking at the docs, PromptTriggered should work, can I see the properties for your prompt?

clickable prompt = true
enabled = true
Exclusivity = oneperbutton
gamepadkeycode = button x
hold duration = 10
keyboard keycode = E
max activation distance = 5
name = arrest
objecttext = arrests the npc
parent = humanoidrootpart
requires line of sight = false
style = default
ui offset = 0,0

auto localize = true
root localization table =

hmm very odd, it should trigger, is it possible you can show me your code that uses these events?

1 Like

ohh nevermind, it works i just broke it on the serverside lol
old script:

				if handcuff ~= "Handcuff" then 
					local Humanoid = plr.Character:FindFirstChild("Humanoid")
					local HumanoidRootPart = plr.Character:FindFirstChild("HumanoidRootPart")
					if Humanoid and HumanoidRootPart then else return end
					ArrestingValue.Value = false
					ArrestedValue.Value = true
					HumanoidRootPart.Anchored = false
					return
				end

renewed script:

				if handcuff == "Handcuff" then 
					local Humanoid = plr.Character:FindFirstChild("Humanoid")
					local HumanoidRootPart = plr.Character:FindFirstChild("HumanoidRootPart")
					if Humanoid and HumanoidRootPart then else return end
					ArrestingValue.Value = false
					ArrestedValue.Value = true
					HumanoidRootPart.Anchored = false
					return
				end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.