Hey! Ive been trying to acess and replace a value in a varaible from another script.
I do have a targetingsystem, when i target something selectedTarget gets a value, i want this value into my spells targets aswell. But they are in another script.
This is what i come up with:
In “Targeting”
SpellAI SpellsAffected = (SpellAI)GetComponent(“SpellAI”);
SpellsAffected.Target = selectedTarget.gameObject.transform;
What is the best way to acess, cause this wont work!
Should i try to acess it from SpellAI? Or?