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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Question about local scripts

Previous Thread :: Next Thread 
Draeton is not online. Draeton
Joined: 04 Jun 2012
Total Posts: 4269
13 Sep 2012 12:25 PM
Will changes made by a local script to something that doesn't originate from the client affect the server? Or is changes to such all local to a client?
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
13 Sep 2012 12:38 PM
Erm, you could have asked that in a better way, as your question is confusing in the way you said it. e_o

Local script's run client side, not server side.
In order for a LocalScript to function, it must be placed within one of three areas:
In a player's Backpack (can be indirectly, through a Tool or HopperBin)
In a player's character model
In a player's PlayerGui

It dosent have to be a direct descendant.

LocalPlayer can only be used through local scripts, when on Online mode.
LocalPlayer is you.

So you could do something like this in a TextButton:

script.Parent.MouseButton1Down:connect(function()
game.Players.LocalPlayer.Character.Humanoid.Health = 1000
end)

So, if someone clicked the GUI, it would make their health 1000.
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
13 Sep 2012 12:39 PM
It would change the server, if you scripted it too.
But you can't put a local lava script in a brick in workspace...
Report Abuse
Draeton is not online. Draeton
Joined: 04 Jun 2012
Total Posts: 4269
13 Sep 2012 12:44 PM
I see what you mean, regarding my question being badly worded, as most of your response was obvious information that I didn't intend to receive.
But that small amount which did contribute towards answering my original question is a Godsend. Thanks.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
13 Sep 2012 02:46 PM
If your localscript changes something that is NOT on the client, then it has to be on the server itself.

Therefore it effects the whole server.

For example, if you use a LocalScript to change a brick in the workspace, it will change that brick for all the players, since the Server hosts it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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