Can't set variables

Jamie

New member
Trying to set a variable and it's not being shared correctly to other scripts. Looks like it sets it locally but doesn't share it. Can you confirm what I'm doing wrong?
 

Attachments

  • before run.png
    before run.png
    251.4 KB · Views: 14
  • script.png
    script.png
    14.5 KB · Views: 16
  • script2.PNG
    script2.PNG
    16.1 KB · Views: 14
Instead of setting Target = transform you should set the Value of the target:

Code:
Target.Value = transform;
By setting the Target directly you are creating a new SharedVariable.
 
Top