hi = false local part = script.Parent.eeee function hit () if part.Reflectance == 0 then if not hi then hi=true end part.Reflectance = .1 print ("1") wait(3) hi = false --here down is the debounce that doesnt work VVVV else if not hi then hi = true part.Reflectance = 0 print ("2") wait(3) hi = false end end end script.Parent.Lever1.ClickDetector.MouseClick:Connect(hit)
sorry but the script you made is over complicated here is the revamped version of that script and it should work
hi = false local part = script.Parent.eeee script.Parent.Lever1.ClickDetector.MouseClick:Connect(function(hit) if part.Reflectance == 0 then if hi == false then hi = true end part.Reflectance = .1 print ("1") wait(3) hi = false else if hi == false then hi = true part.Reflectance = 0 print ("2") wait(3) hi = false end end end)