How to change Third Person Character color like Star effect in Super Mario games? (blueprints)

I need help with changing the Third Person Character color like the Star effect in Super Mario games. I will explain what I want to do:

Explanation: I’m trying to change the Third Person Character color when the character get a Star. I already did the color change to yellow to the character when the character get the star, but is permanently (When the character get a star, the character will change its color to yellow). I want it to change the character’s color to yellow, next returns to its normal, next yellow, next returns to its normal, until the star effect ends (5 seconds).

This is an example of what I want to do with the character’s color, but only changing its color to yellow and returns to normal (yellow, normal, yellow, normal, yellow, normal):

Edit from staff: Epilepsy warning on the attached gif.

Material nodes:

World time or game seconds or something like that.
Hook it up to Sine function. This will spin a value over time between -1 and 1 forever.
Plug that value into a multiply node. Plug your yellow color node into that multiply node also.

Plug the multiply node into an add node. Plug the character skin texture into the add node also.
Plug the add node into the Base Color of the Material node. (I hope this works)

Now it will always flash, so you need a way to activate or deactivate the flashing.

To do that, create a scalar parameter node and plug it into the multiply node also. Then in blueprint you can turn it on and off by setting the scalar parameter to 1 or 0.

If you have more than one character that can use Star power and they need to flash individually instead of all of them flashing when one of them has star power, then your character blueprint will need to create a Material Dynamic Instance on their Beginplay, and change the scalar param on that MDI (make sure to promote it to a variable where you create it) instead of on the original material.

you can only plug two things into a Multiply node tho so that doesnt really work