Button Outline Color updates only once

I have an issue where I have several categories for something, and I want the color of the outline of the button to change depending on what category something belongs to.

I am using the above screenshot to set the color via setting the style of the button. The problem is it will update the color once, then when it runs the same thing again it wont update to a new color. I tried setting the variable to instance editable but it didnt effect anything.

There are some kind of annoying work arounds i’ve figured out but i’d much rather use the outline feature/prebuilt button outline styles as it seems cleaner.

Does anyone know how to fix this, is the style being cached or something?

Are you sure the style is being updated as intended? Is there some portion of logic that stops it from working after the first time? Can you print out and see the change occurring properly?

Edit: I actually think this bug might be caused by some array errors that aren’t shown here, this can probably be deleted.

I think when I implemented it the second time I tried I copied over the same error.