I set a value from another script on 100.
If i use a function with that same value the value is still 0.
I can’t figure out why…
hit.other.parent.script.healthDamage = 100;
console.log(hit.other.parent.script.healthDamage); < result is 100 >
hit.other.parent.script.enemy.setHealth();
Enemy.prototype.setHealth = function () {
console.log(this.healthDamage); < result is 0 >
};