ProximityPrompt Not Triggering

In this video, for whatever reason, using certain ability breaks this script.

I have no idea what causes this, is this a bug? This script is simple. There’s no errors or prints.

local proximityPrompt = script.Parent

proximityPrompt.Triggered:Connect(function(player)
	print("trigger by "..player.Name)
	local character = player.Character
	
	if character:GetAttribute("NoCooldown") == false then
		character:SetAttribute("NoCooldown", true)
	elseif character:GetAttribute("NoCooldown") == true then
		character:SetAttribute("NoCooldown", false)
	end
end)
1 Like

Try adding a debounce maybe as if someone spams the proximity prompt too much it causes it to lag and perhaps break the script.

It only one person activating it so that wouldn’t make sense, plus it’ll at least print something.