Hello, I saved a file named “MainModule” as ModuleScript to roblox. but when i run it i get an error like this. can you help me?
![]()
My Module
![]()
Code in MainModule
![]()
Code in MainFiles, blue place is the ID of the MainModule

And error.
Hello, I saved a file named “MainModule” as ModuleScript to roblox. but when i run it i get an error like this. can you help me?
![]()
My Module
![]()
Code in MainModule
![]()
Code in MainFiles, blue place is the ID of the MainModule

And error.
It looks like you’re trying to use “require()” to get a regular script. Using require() only works when trying to get other module scripts. Using it to get regular server/local scripts doesn’t work.
The following is what you would need to do from the “Komutlar” script:
require(script.Parent)
thanks, it didn’t give an error right now. but when I do require () in my MainFile, I want it to run in the “Komutlar” file in my MainModule. How should I reason?
if you require a normal script, then it will error
if you require the module, it is just like importing lines of returns from a module script to the module requester
I understand, but as you know when I write these code attes into the modul script, it gives some errors because local is not used and I need to use it. I shouldn’t use function logic in my project.
![]()