How can I change a material to another with a trigger volume?

to accomplish this you will need to use the on begin and end overlap events. these two events will tell the script when to change the materials. the next thing you will need is a reference to the mesh you want to affect. below theres two examples based on the overlaps. in the first we get the overlapping actor, then cast to identify the actors class, then we get the mesh (sphere). The second example shows how you could work with components directly, in this case we get a overlapping component and identify the mesh type (mesh, static mesh, skeletal mesh). I don’t know of a mesh parent class so here i showed casting to specific mesh types (needs further study). anyway the last thing you need to do is to create a material instance and set the material.

in summary on overlap event → identify mesh → create material instance → set material.