i have been rewriting this script over and over and maybe i’m just not putting it in the right place… but here we go.
function OnTriggerEnter (other: Collider){
if(other.gameObject.tag == "Respawn"){
renderer.material.mainTexture = Resources.Load("fluffacedead");
}
}
i created a folder in my assets called Resources. i put the texture in that folder. i have little guys that run around with happy face textures on. when i stab them i want the texture to change to their dead face. i have tried many variations but cant get it to work. please help! here’s my layout. a poker that comes down with a button press… little guys that get stabbed. i think the script is fine but how should i set this up? and if the script isn’t fine than i am stumped beyond stumped. thanks in advance. this is driving me crazy.