I have a problem with this line of code for some reason

So in my script when I require this module script the rest of the script doesn’t run anyone knows why?
All I’m doing is requiring the module script not even running it.

local Light = require(game.ReplicatedStorage.Viewmodel.Modules.LightMatchScript)

requiring a module for the first time runs it

Check the module for anything that yields. When you require a ModuleScript it runs the script basically as a normal Script/LocalScript in the same thread as the Script/LocalScript you are requiring it from. Try that first.

Even if I ran the module it has nothing to slow my script down but ill put it in a spawn just in case

Ahhh nvm fixed it I found the problem the problem was I was waiting for child and I didn’t know requiring ran the script I fixed it

1 Like