# How to encapuslate Niagara Module Script logic into a function, and what is a Niagara Function Script

**URL:** <https://forums.unrealengine.com/t/how-to-encapuslate-niagara-module-script-logic-into-a-function-and-what-is-a-niagara-function-script/1988797>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [August 23, 2024, 11:17am UTC](https://forums.unrealengine.com/t/how-to-encapuslate-niagara-module-script-logic-into-a-function-and-what-is-a-niagara-function-script/1988797 "2024-08-23T11:17:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PieBaron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PieBaron](https://forums.unrealengine.com/u/PieBaron)\
**Post date:** [August 23, 2024, 11:17am UTC](https://forums.unrealengine.com/t/how-to-encapuslate-niagara-module-script-logic-into-a-function-and-what-is-a-niagara-function-script/1988797/1 "2024-08-23T11:17:47Z")

</div>

Ello, I made a custom niagara module script, and its got some basic math nodes logic in there, which I’d like to encapsulate and re use. I couldnt find a way to encapsulate the nodes, so I created a Niagara Function Script object, which resembles a function like what you’d get for materials. However, I cant seem to be able drag this function into my Niagara Module Script graph, i tried ticking the different Module Useage Bitmask params but any conbination I tried (just function, or module, or everything etc), it wouldnt let me use it

---

<div class="post-metadata">

**Author:** ![PieBaron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PieBaron](https://forums.unrealengine.com/u/PieBaron)\
**Post date:** [August 23, 2024, 9:27pm UTC](https://forums.unrealengine.com/t/how-to-encapuslate-niagara-module-script-logic-into-a-function-and-what-is-a-niagara-function-script/1988797/2 "2024-08-23T21:27:23Z")

</div>

Figured it out with help from Gomorrah on Ashers discord, basically, I had to tick this box  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/6/03653f0b15fb237f75cdbf82609529b1c3738658.png)  
to make it be Suggested. Then I can search for it when in the Niagara Module Script (call it NMS for short) node graph, make sure to untick “library only”, then it will show up.  
The reason it doesnt let you drag it from the content browser directly into the NMS Node Graph is because a niagara function module is like… a component or something, and a function in a NMS Node Graph is another type of object which lets you select that component, and it becomes the function.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 22, 2024, 9:27pm UTC](https://forums.unrealengine.com/t/how-to-encapuslate-niagara-module-script-logic-into-a-function-and-what-is-a-niagara-function-script/1988797/3 "2024-09-22T21:27:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
