Hello, I am trying to convert my game into module scripts, and I am having an issue on the client side. I have a module script in StarterGUI along with a local script which calls it, and i am getting this error.
Why is this happening? This was not happening on the server side.
Maybe the module isn’t loaded yet. Try using:
game.Players.LocalPlayer.PlayerGui:WaitForChild("GuiHandler)
Inifnite yield possible it says
This might be a silly question. But is your code spelled correctly?
Can we see the module script and local script please?
If you are calling one of the Players Children inside the ModuleScript, i dont think it would work, you can try setting a Variable to the LocalPlayer, and when on the LocalScript, call the Player , and then the Player’s Gui from there
Looking back i wasnt reading right:
So something like this:
local module = {
plr = game.Players.LocalPlayer;
}
return module
A = require(ModuleScript)
A.plr.PlayerGui -- Might work but im not sure
You can also try StarterGui
Yeah it was, but I just realized I shouldnt be using module scripts for local scripts anyways because there is not really a point if it is being replicated, also because I am calling remotes in the modulescript. So i just reverted to the local script.