|
| 19 Jul 2016 12:05 PM |
function onClicked(click) if click.Parent:FindFirstChild("Humanoid") ~= nil then
if game.Players:FindFirstChild(click.Parent.Name) ~= nil then
local player = game.Players:FindFirstChild(click.Parent.Name) if player:FindFirstChild("PlayerGui"):FindFirstChild("SoundGUI") == nil then player:FindFirstChild("PlayerGui"):ClearAllChildren() local sg = game.Lighting.SoundGUI:Clone() sg.Parent = player.PlayerGui end end end end script.Parent.ClickDetector.MouseClick:connect(onClicked) ------------------------------------------------------------------ I've checked that SoundGUI is in game.Lighting The script isn't disabled The object has a ClickDetector There's something I missed? |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 19 Jul 2016 12:28 PM |
The MouseClick() event returns the player who clicked the ClickDetector.
--don't you people ever check the API? |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2016 12:44 PM |
| But the MouseClick event is the correct event, isn't it? |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2016 12:47 PM |
Yes. MouseButton1/2Click/Down/Up are all part of the GUI
MouseClick only works on ClickDetectors, and some other things I can't remember. |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2016 12:50 PM |
But If the script is correct, why doesn't it work?
Sorry I can't find the answer myself. |
|
|
| Report Abuse |
|
|
gskw
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1364 |
|
|
| 19 Jul 2016 12:55 PM |
| ClickDetectors don't work in FE, if you're using that. |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 19 Jul 2016 01:51 PM |
You should be using FE. Thats your first mistake.
|
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 19 Jul 2016 01:55 PM |
TimeTicks, you literally post that on every single thread. It's not helping and no one likes your input. When someone asks you how to do something, you don't answer with something completely irrelevant to the question.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 19 Jul 2016 02:07 PM |
I post that because that's the right way to do thing. If you aren't willing to do something the right way then what the point? Why should I promote BAD programming habits?
|
|
|
| Report Abuse |
|
|
DogeKip
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 6860 |
|
|
| 19 Jul 2016 02:09 PM |
@TimeTicks They're asking for help and clearly they're not ready for FE if they can't manage normal quite yet, they're still learning so either help them learn or leave their posts alone, simple as that. I don't use FE because I don't plan on making large games, I make them for my friends or for proof of concept.
[Redacted] |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 19 Jul 2016 02:13 PM |
It's not wrong to not use FilteringEnabled. It's not like deprecation. It's a feature that roblox allows you to turn on and off for a reason. Newer scripters don't know how to make scripts with FilteringEnabled and have only started out scripting. This isn't the only person you did this to, and trust me when I say this. You're not helping anyone. At this point you're just being an annoying little sht.
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=194048551
|
|
|
| Report Abuse |
|
|