Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this script work? (whats wrong)

Asked by 8 years ago
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

0
That's not a debounce. What I think you're trying to do is kind of like a toggle/switch. Redbullusa 1580 — 8y
0
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 DarwinYork 85 — 8y

Answer this question