# Script scope help

**URL:** <https://forum.inductiveautomation.com/t/script-scope-help/64613>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 28, 2022, 5:51pm UTC](https://forum.inductiveautomation.com/t/script-scope-help/64613 "2022-09-28T17:51:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [September 28, 2022, 5:51pm UTC](https://forum.inductiveautomation.com/t/script-scope-help/64613/1 "2022-09-28T17:51:32Z")

</div>

> [@Running Perspective Project Library script from event script ValueChange tag](https://forum.inductiveautomation.com/t/running-perspective-project-library-script-from-event-script-valuechange-tag/43850):
>
> I am trying to run a script from the project library. I have done this before on another project where I called the function by setting an event script (ValueChanged) on a tag. If the tag value (boolean) goes high I want to execute the function. For some reason I was able to do that on another project no problem. First project where it worked was version 8.0.14. This time I am using 8.1.1. Due to not getting the script to work I simplified it to simply write something into the logs using s…

I was trying to absorb the information here, but some of the wording isn't clear to me.  
In the project browser I have Scripting that expands to gateway events and project library.

In Ignition 8.1.0:  
My tags can't call the scripts from the project correct?  
My perspective sessions can call those scripts correct?

In Ignition 8.1.18:  
Tags will be able to call scripts from the project library?

I think the source of my confusion is that when the Global Scripting Project, I don't know what that is, where it is, or what can access it.  
Maybe my project is considered a "leaf", and I don't know it because I never saw the parent project.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 28, 2022, 6:03pm UTC](https://forum.inductiveautomation.com/t/script-scope-help/64613/2 "2022-09-28T18:03:04Z")

</div>

No difference in scoping between versions.

Tags are not part of any project. To make any kind of scripting available, a project must be designated as the “default” for tag events to use (or `runScript` in an expression tag). That is what the Global Scripting Project is for. Tag events cannot use scripts from any other project.

Perspective sessions belong to a project, so they use that project’s scripts.

Project inheritance can be used to make scripts available in multiple projects.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 28, 2022, 6:11pm UTC](https://forum.inductiveautomation.com/t/script-scope-help/64613/3 "2022-09-28T18:11:59Z")

</div>

The Global (or Gateway) Project Script is set in the gateway config.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/c/cc9e0e1b0820834840df5c05ee90a8a75eabae15.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f1fa28551529420fcf9d8a7c95383154c4b7317d.png)
