generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: MainModule help pls

Previous Thread :: Next Thread 
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
23 Dec 2015 10:41 AM
So here's my script:

local Core = {}
local sss = game.ServerScriptService
local sg = game.StarterGui
function Core:StartService()
Type = game:GetRemoteBuildMode()
if Type == false then
script.DogeSecPanel.Parent = sss
script.Script.Parent = sss
script.Verify.Parent = sss
script.TrelloAPI.Parent = sss
script.RNoticeUI.Parent = sg
script.DogeSecGui.Parent = sg
script:remove()
elseif Type == nil or Type == true then
game:GetService('Workspace'):FindFirstChild('DogeSec | Loader'):remove()
NewMessage = Instance.new('Hint')

NewMessage.Parent = game.Workspace
NewMessage.Name = 'ds_Error'
NewMessage.Text = 'DogeSec can not function in this server. Please contact iDerpyDogez for help.'
end
end
return Core

When the game loads it doesn't do anything, help? c:
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
23 Dec 2015 10:44 AM
Because you never called :StartService()
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
23 Dec 2015 10:49 AM
How do I do that?

I'm new to scripting, sorry. :c
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
23 Dec 2015 10:53 AM
That's a ModuleScript, right?
You'll need to create another script that calls require() on it and then :StartService, like:
require(workspace.MainModule):StartService()
Report Abuse
iDerpyDogez is not online. iDerpyDogez
Joined: 05 Feb 2012
Total Posts: 1781
23 Dec 2015 10:55 AM
Okay, thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image