#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)
are you not able to use a modulescript?
you can use bindable events/signal classes otherwise
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
it allows multiple scripts to fire the same function/access the same info
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
you can also try this if youd like ^ (reply), but it is def beneficial and best practice to use modulescripts to strive for modular code
Getting a "getScript is not a valid member of Part "Workspace.KeycardDoor.Door" error from this.
can i see your updated explorer with the modulescript inserted in?
oooh shit
Didn't realse moduleScript is its own piece
Let me remake that hold on
also make sure when requiring it is the actual path to the modulescript. like ```lua
local module = require(workspace.Car.Engine)
Going to need to learn the usage of ModuleScript give me a moment
@restive gorge Yep got it working :)
Thank you very much.
no problem
** You are now Level 2! **