-
What do you want to achieve?
I want my local script to check if the part’s attribute “Light” is true then set the boolean “LightEnabled” in the table to true. -
What is the issue? Include screenshots / videos if possible!
It prints “false” in the table, even if the attribute is already true. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked for solutions yet I found nothing.
More details:
I have two tables. The manager and the Info. The info is inside the manager. The info contains the booleans.
The code below is inside a Heartbeat.
for index, region in pairs(SanityRegions) do -- 'SanityRegions' is already a GetChildren().
-- Region Manager
for i, regionInfo in pairs(regionManager) do
local LightEnabled = regionInfo.LightEnabled -- Boolean in the info table
-- Check attribute
if region:GetAttribute("Light") == true then
LightEnabled = true
else
LightEnabled = false
end
--
end
--
end
prints “false” in the table in the output. I have other booleans too in the table and also doesn’t change for some reason.