First of all I am not sure why there are spaces missing after “public” and “void”
Second:
damage = GetComponent().currentdamge;
This would mean that your GameObjects with an “Enemy” component also would require the Damagecounter Component.
If i understand you correctly these are on seperate GameObjects within the Scene. So you need to address the proper Gameobject first
it works like a charm but the problem is it only updates once on start how can i make it update all the time and how can i make the currentdamge to a reference so i can use it other actions count find it in google
Firs tyou should store the Damagecounterscript (BTW, still you should look at the naming conventions) in a class-level variable, then you call the damage = Damg… in the update method