#Trying to access a script A's function from another script B without making script A's function _G

22 messages · Page 1 of 1 (latest)

ripe impBOT
#

studio** You are now Level 2! **studio

restive gorge
#

are you not able to use a modulescript?

#

you can use bindable events/signal classes otherwise

acoustic veldt
#

I will check that out

#

This is what I am working with

#

Using an online example, I have setup this in the DoorSliderScript

#

And this in the KeyCardScannerScript

#

not sure if I am using this correctly.

#

Reading the doc for "ModuleScript", it doesn't seem that I am using this to its intended purpose lol

restive gorge
#

since you need two scripts to access .Open, you can require the module w/ that function in both scripts and fire it however youd like

restive gorge
acoustic veldt
restive gorge
#

can i see your updated explorer with the modulescript inserted in?

acoustic veldt
#

oooh shit

#

Didn't realse moduleScript is its own piece

#

Let me remake that hold on

restive gorge
#

also make sure when requiring it is the actual path to the modulescript. like ```lua
local module = require(workspace.Car.Engine)

acoustic veldt
#

Going to need to learn the usage of ModuleScript give me a moment

#

@restive gorge Yep got it working :)

#

Thank you very much.

restive gorge
#

no problem