ok so, i have my first script that keeps track of the enemies health and kills it when its health is less than 1. Then i have another ray cast shooting script that when it hits a rigid body, it minuses 1 from that enemies health. i need lots of help on this, ive been searching for days for an answer. thanks!
Really??? You didn’t search very hard:
To access it from another script you need to use the name of the script followed by a dot and the global variable name.
print(TheScriptName.someGlobal);
TheScriptName.someGlobal = 10;