- Home /
Ammo Pick problem im using c#
void OnTriggerEnter(Collider other) { if(carryAmmo >= 100) { return; } if (other.gameObject.tag == "AmmoPack") { carryAmmo += 50; carryAmmo.text.value = carryAmmo; Destroy(other.gameObject); } }
SO. my Player is the Holder of the Character and my Weapon is attach to the bone of the Character. my weapon script is attach at the weapon, i tried to create a ammo pick but i dont know how to send the value to my weapon which is inside my Character Bones,
i made a health pick and it work probably because my stats is attach to the player not in the character. so i tried to use the same script of my pick up health and change it to ammo and i doesn't work how do i approach this problem please give an example would help me a lot
Your answer
![](https://koobas.hobune.stream/wayback/20220612191501im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Gun Ammo Help 3 Answers
Scavenger script woe... 1 Answer
When i shoot, the next shoot will have the bullet half way down the screen!!! 1 Answer
Countdown by pressing a button. 2 Answers
Trigger a void only once even is used by multiple scripts? 2 Answers