I am working on a study project. I am creating multiple colored frames and I am trying to make them change their color.
I have tried to methods, the first one setting the color via SetTexture and then using SetColorTexture to change the color of the texture on the frame. This is very unreliable, (maybe I am initalising the farmes incorrectly...?) but they sometimes dont show up, or show up in black without the color changing. Doing a couple of /reload fixes them but, its a very undeterministic behaviour. They show up as white, but doesn't change. Code for this one, they somehow get stuck with being white:
You don't tell us what the Set and Get functions are doing (setting the colours I'm guessing at here). Also, OnEvent and OnUpdate are two different scripts to do two different things. The game will trigger health update events which might be better in this situation than using OnUpdate which will cycle far more often than health gets updated (especially out of combat).