- Home /
Error in my game
I am facing an error, before introducing health Crate the error was not there but after i introduced the health Crate, the error started occuring. I duplicated the ammo script and named it as health Crate, then i created a new script for health Crate and i copied everything from the ammo crate script and pasted in the health crate script. Then in health crate script i changed every ammo to health. Then i wrote code for the health script in my player script and then i compiled and it was successfully compiled but when i clicked play the Health was 0 and upon being hit by enemy it was increasing and sometimes decreasing as well, before the error the health was 100 and it would decrease after being hit. Also after picking up the health crate there is no increase in health and now ammo crate is also not giving me any ammos. Please solve the error at an earliest.
could you please post the code ? it's a bit tricky to help if we can't see the code ^^"
Your answer
![](https://koobas.hobune.stream/wayback/20220613001911im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I keep my ammo count going over the cap? 1 Answer
how do i attach a gun to my character 2 Answers
Scavenger script woe... 1 Answer
Damage by bullets issue. Solved. 1 Answer
Health script 0 Answers