Choose all meshes with same name

Hi guys,
I am creating several meshes with the same name in my projekt. I implemented, that a mesh turns red if i go with my mouse on it.
Now i would like to implement, that all meshes with the same name turn red, if I hover on of them.

Currently I have no idea how to do it. Can you help me?
Thanks!

for (const mesh of scene.meshes) {
    if (mesh.name === 'mySameName') {
        mesh.material ... //do whatever
    }
}
3 Likes

Thanks! That totally worked.