So, I've got a localscript for a GUI inside a module script.
Whenever I click the button, the code inside the local script doesn't run UNLESS I have the module script somewhere in the game.
LOCAL SCRIPT:
script.Parent.logo.Button.MouseButton1Click:connect(function() script.Parent.main.Visible = true end)
Hierarchy:
This appears to be related to replication ordering. What I think is happening is your LocalScript is running before your logo or Button objects are replicated to the player.
This sort of problem can be fixed by using the WaitForChild method:
local main = script.Parent:WaitForChild("main") script.Parent:WaitForChild("logo"):WaitForChild("Button").MouseButton1Click:connect(function() main.Visible = true end)
Without further explaining what module you are talking about or supplying an error message, this is the only problem I can see happen in this situation.