So i tried this to make my actor (in this case is a gun to dissolve and appear gradually over time) but the error “accessed none trying to read ___” keep popping up and the material of the gun doesnt dissolve either. So the question is should the function be in the actor’s blueprint or what should i do to make this work? (the actor is spawned in and attached to my player character on event begin play btw)
the construction script is called before Begin Play. If you want to keep eveything in the character, you must create the material instance and save it in the begin play.
My advice, is to put everything related with the weapon in the weapon, and the all the character do is calling functions of the weapon when need it.