Changing color on an object based on health

Okay turns out… I dint use the same parameter name as the vector3 name i had in the materials like an idiot, I fixed it accordingly and adjusted my coding as you showed me and everything is working as intended! thanks alot for the help I’m still fairly new with this.