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)

2 comments

0

I see no problem here, i suggest debug it ewith print statements to see what runs and what doesnt.

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!