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

How do I used changed property for a light?

Asked by 3 years ago
Edited 3 years ago

In a folder I have a couple boolean values, one is named Light that should control weather a Spotlight is enabled or not deepening on the value, true or false of Light

There are no errors in my prompt or anything, maybe I just used GetPropertyChangedSignal wrong?

I havn't been on roblox in like a year so I feel foolish for asking this question lmao.

folder.Light:GetPropertyChangedSignal("Value"):Connect(function()
    if folder.Light.Value == true then
        script.Parent.SpotLight.Enabled = true
    else
        script.parent.SpotLight.Enabled = false
    end
end)
0
I see no problem here, i suggest debug it ewith print statements to see what runs and what doesnt. AlexanderYar 788 — 3y
0
Whoops! It does work! I was changing the Bool value from the game in the properties tab to test it out instead of using an actual button to change the value in game! User#29785 0 — 3y

Answer this question