BP to change material and colour only works with certain meshes.

Hello
.
I am currently developing a project for real time architecture.
In this project I created a BP blueprint that handles changing object colour and material, but it only works with certain objects, it appears that those objects are random.
I have tried everything so I was hoping you guys could help me :slight_smile: