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: Making a server script effect clients

Previous Thread :: Next Thread 
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:08 PM
I'm making an admin script and need it to be able to do local things to people

Should I make 1 local script with lots of functions in it or lots of local scripts for each thing it needs to do
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 Jan 2015 07:12 PM
1 Local script with lots of functions, unless you want to make groupings, then use ModuleScripts. Have a LocalScript to manage local commands, and ModuleScripts in it to sort the commands. This would also allow you to make add-on modules for it.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:15 PM
Do you mean like make a module script with every local command in it, and then have a local script require it, and then make the local script wait for the server script to tell it what to do?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:25 PM
Wait

Can local scripts use loadstring even if loadstring isn't enabled and server scripts cant

Or is it the other way around
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Jan 2015 07:26 PM
Local scripts can never use loadstring, the property is only meant for server scripts and whether or not they can :)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 Jan 2015 07:26 PM
No, multiple ModuleScripts each with it's own set of commands.

So you can have a module related to fun commands, one for just the general administrative commands, and things like that. I had multiple more suggestions for modules, but I remembered that this is just the client.

So just have the LocalScript wait for a moment, then require all of it's children modules, adding the commands from a returned table into a table containing all of the commands.

Anyhow, I really like that idea, because then you can use add-on modules and such. That's just the way I would do it, but obviously up to you.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
06 Jan 2015 07:27 PM
"And then wait for the server script to tell it what to do"
Well, you can do that just by sending a RemoteEvent to execute the command on the client, or you can read chat on the client too.


You can use a loadstring-workaround with a parser :)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:28 PM
Where can I put the local script so it doesn't have to be regiven to the player every time they spawn
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
06 Jan 2015 07:32 PM
Startertools? idk
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:33 PM
I want the script to not be removed though, because if it has to reload every time then it has to require all the modules again
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
06 Jan 2015 07:36 PM
yeah, startertools

they dont reset upon death, not sure if local scripts run in it tho
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:37 PM
They don't run, and get cloned and ran in the backpack

So it would still run every time
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
06 Jan 2015 07:38 PM
inside the player ;o
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:40 PM
Scripts don't run in the player
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Jan 2015 07:42 PM
game.Players.ChildAdded:connect(function(p)
--run stuff?
end)
--in a local script in workspace?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
06 Jan 2015 07:43 PM
Local scripts don't run in workspace and that is not my problem
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Jan 2015 07:43 PM
Am I the only one who creates a whole API and set the environment for the "round/map/etc. script" of each?
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
06 Jan 2015 07:44 PM
nullify the parent?
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