local part = workspace.Part
local spotlight = part.SpotLight
local Enabled = true
script.Parent.ClickDetector.MouseClick:connect(function()
if spotlight == Enabled then
Enabled = false
elseif Enabled == true then
Enabled = true
end
end)
new to scripting and trying to make sense of debounces and stuff like taht and started here

2 comments
That's not a debounce. What I think you're trying to do is kind of like a toggle/switch.
im trying to learn how to debounce and i figured id try to start from the template you posted on the cframe model but it doesnt give me an error in output just doesnt work