When I press a button, a bool value changes. How do I make it run a function when the bool value changes? I want the function to activate when the bool value changes. Here's my script. Thanks.
local ChargeValue = script.Parent.Parent.Stats.Actions.Charge
local function ChargeAction()
print("Value Changed")
end
ChargeValue.Changed:Connect(ChargeAction)
ChargeValue.Value = false

3 comments
Use BoolValue.Change instead of changed
maybe the boolvalue is already at false, so there isnt any change
@JesseSong Could you elaborate please?