Glicon
|
  |
| Joined: 26 Feb 2009 |
| Total Posts: 981 |
|
|
| 03 Dec 2012 11:12 PM |
| I've known about local scripts for awhile now, but I've actually never figured out how to use them. It was until now that it'll be any use to me, and I can't seem to find a tutorial on the wiki at all. Especially because it's search engine searches in keywords, when I search "local script," a bunch of "local"'s pop up. |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2012 07:22 AM |
| LocalScripts are a client side class. They have to be within an object owned by the player object such as the character or anything in the player such as the backpack or playergui. |
|
|
| Report Abuse |
|
|
Glicon
|
  |
| Joined: 26 Feb 2009 |
| Total Posts: 981 |
|
|
| 04 Dec 2012 08:01 AM |
| Alright, so if I placed it in their Player's backpack or something, only they would be able to experience what the local script does? |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2012 02:29 PM |
Localscripts can access client side things
game.Players.LocalPlayer
returns the player that owns the script
game.Workspace.CurrentCamera
returns the players camera
game.Players.LocalPlayer:GetMouse()
returns the players mouse. Very useful for binding things to keys. |
|
|
| Report Abuse |
|
|
Glicon
|
  |
| Joined: 26 Feb 2009 |
| Total Posts: 981 |
|
|
| 04 Dec 2012 04:15 PM |
| Alright, I'll look into it. Thank you. |
|
|
| Report Abuse |
|
|