Unable to change a BoolValues value

I need to change a BoolValue instance, yet when I try it doesn’t work - I checked the hierarchy and thats correct


local dataexternal = script.Parent.Parent["FPL Lever"]["FPL Lever"]["Direction Status"].Value

dataexternal=true

I also removed .value and added it to the dataexternal=true area, yet that doesent work

If anyone can see any obvious issues that would be greatly appreciated

You’re changing the value of the variable referencing the BoolValue’s value. Try to edit the property directly.

script.Parent.Parent["FPL Lever"]["FPL Lever"]["Direction Status"].Value = true

Don’t add .Value until you’re changing it or reading it.

local dataexternal = script.Parent.Parent["FPL Lever"]["FPL Lever"]["Direction Status"]
dataexternal.Value = true
Print(dataexternal.Value)

.Value is a property of the BoolValue (dataexternal) you’re assigning to a global.

1 Like