|
| 26 Apr 2014 10:47 AM |
script.Parent.MouseButton1Click:connect(function()
for i,v in pairs(game.Players:GetChildren()) do
copy = script.Parent.Parent.Parent.Flash:Clone() wait(0.01) copy.Parent = v.PlayerGui wait(0.01) v.PlayerGui.Flash.FlashEffect.Disabled = false end end)
I know I made the problem at :GetChildren, but I'm not sure how to find the direct player who clicked the SurfaceGui button. Any help? |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 10:49 AM |
http://wiki.roblox.com/index.php?title=SurfaceGui Put the SurfaceGui into StarterGui, and then put a script inside it to change it's adornee to the brick you want the Gui to appear on. Then just edit your script accordingly.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 26 Apr 2014 10:49 AM |
| You detect who clicked a surface gui by having it inside the player (starter gui or whatver) but with the adornee set to whichever brick. This way you can get the player instance by doing script.Parent.Parent or game.Players.LocalPlayer. |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 10:52 AM |
| Wow, that was easy. Thanks. |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 10:59 AM |
Um...that didn't work?
I put the SurfaceGui in lighting and this localscript in lighting. This is what the localscript does.
script.Parent.EffectGui.Adornee = game.Workspace.Gate.GateOfWorlds.Wheel |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 11:00 AM |
Put it in StarterGui, not Lighting, unless you're moving that gui from Lighting to the player's PlayerGui. I'd recommend to just put it in StarterGui.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 11:01 AM |
| Mistake. It is in Startergui. Still don't know why it won't work... |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 11:03 AM |
Did you edit the script accordingly, now that you moved the SurfaceGui to StarterGui (which will go to the player's PlayerGui)?
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 11:06 AM |
| Yeah, that's not the problem. The EffectGui isn't appearing within the Brick as a child.... |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2014 02:51 PM |
| It wasn't supposed to appear as a child. I get it now. Yet, now I'm unable to edit it through a clickdetector brick. Much difficult ROBLOX...Anything to do about that? |
|
|
| Report Abuse |
|
|