|
| 16 Sep 2015 04:36 PM |
Hello. I'm fairly new to scripting and I need some help with this script:
function onClicked() local p = game.Players:GetChildren() for i = 1, #p do game.Lighting.GUI:clone().Parent = p[i].PlayerGui end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
How would I make it so it only gives the GUI to the player who clicked it? All help is appreciated. |
|
|
| Report Abuse |
|
|
darkmanz5
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 126 |
|
|
| 16 Sep 2015 04:39 PM |
| Move is to the scripting section, It's right under Game design I believe. |
|
|
| Report Abuse |
|
|
darkmanz5
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 126 |
|
|
| 16 Sep 2015 04:40 PM |
Also, make make the script a localscript, not a normal script. Local is for only one player. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2015 04:42 PM |
@Dark
Then they seriously need to update the Forum Descriptions.
"Anything that is not a help request or topic belongs here."
Also, I'll try local script. |
|
|
| Report Abuse |
|
|
darkmanz5
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 126 |
|
|
| 16 Sep 2015 04:42 PM |
| To prevent confusion, with one player I mean that it only activates the script for the player that's clicking it, not for the whole server (all the players). |
|
|
| Report Abuse |
|
|
darkmanz5
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 126 |
|
|
| 16 Sep 2015 04:44 PM |
@Dragon
The forum rules are old, from what I've seen is that everyone posts against those rules in topics, it's also told that we cant hire people here, yet everyone does it. |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2015 04:46 PM |
| @Dark I just tested it and the script broke. |
|
|
| Report Abuse |
|
|
darkmanz5
|
  |
| Joined: 21 Dec 2010 |
| Total Posts: 126 |
|
|
| 16 Sep 2015 04:47 PM |
| lolololol sorry then, also a beginner.. From what I've heard is that people use local... Good luck tho ;) |
|
|
| Report Abuse |
|
|