Attempt to index boolean with 'AttributeChanged'

`local Boolean = Instance.new("BoolValue")`
Boolean.AttributeChanged:Connect(function()
	if Boolean.Value == true then
		tween:Pause()
		tweenPowerPercentage(100/100*percentage.Value,0,0,false)
	end	
end)

When the boolean is getting changed, the output results in “attempt to index boolean with ‘AttributeChanged’”

local Boolean = Instance.new("BoolValue")
Boolean:GetPropertyChangedSignal("Value"):Connect(function()
	if Boolean.Value == true then
		tween:Pause()
		tweenPowerPercentage(100/100*percentage.Value,0,0,false)
	end	
end)

Why are you using AttributeChanged when you’re checking the value of the bool?

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.