charecter collider and changing another script form its collision

function OnControllerColliderHit(collision : ControllerColliderHit) {
if(collision.transform.tag == “stockpile”){
if(materials < maxmaterials){
materials = maxmaterials;
collision.gameObject.GetComponet(stockpile).amount = 0;
}
}
}

how come this wont access the other script?
it has to be with a charectercontroller

Hi how is it not accessing the other script? can you give the error code please, and make sure the name of the script is correct and attached to the object :smiley: