Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make a modulescript load a GUI?

Asked by 5 years ago

So I have this module script saved to Roblox and I want to require it and load a GUI. Putting the GUI within the script doesn't work. Any help?

1 answer

Log in to vote
0
Answered by 5 years ago

When you create a module script, it'll create a table which it will then return. Change the local to a local function and return it at the end. Do all the UI code in the function, for example.

local function startApp()
  -- do stuff
end

return startApp()
Ad

Answer this question