Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 07 May 2016 04:29 PM |
Im making a Surface Gui Music player, but I noticed that MouseButton1Click seems to only work in Player guis and not SurfaceGuis.
Anyone have any fixes for this? (I know I could have Bricks for buttons instead but that's not really practical) |
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
| |
|
| |
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 07 May 2016 04:56 PM |
| ^ That doesn't seem to be working either. |
|
|
| Report Abuse |
|
|
Dev_Ryan
|
  |
| Joined: 10 Mar 2013 |
| Total Posts: 243 |
|
|
| 07 May 2016 04:59 PM |
MouseButton1Click/Down/Up is for localscripts to get the mouse of the player's client. It wont work in a server script. Also you might have to use ClickDetector object instead, and if you are using Filtering Enabled then you will need to make the clickDetector send info from the server to the client using RemoteEvent or RemoteFunction.
|
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 07 May 2016 05:04 PM |
@Dev_Ryan Hold your horses. The script is local and I've seen plenty of people do this before. I know its possible, but how? |
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
| |
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 10 May 2016 04:50 PM |
| have mouse.Target be the block which the surfacegui is on, then use that event on the brick itself. You can't click the gui, you can only click the part |
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 10 May 2016 04:55 PM |
aww ok. That sucks but ok.
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 10 May 2016 05:03 PM |
If it's local MouseButton1Click should work fine... I used this from my surfaceGui
Button.MouseButton1Click:connect(function() end)
|
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 10 May 2016 05:04 PM |
Doesn't really suck you can just say
script.Parent.SurfaceGui and do whatever you want with it. |
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 10 May 2016 05:23 PM |
LOL RIP. The only reason the Buttons didnt work was because the whole thing was in my character.
|
|
|
| Report Abuse |
|
|
|
| 10 May 2016 05:24 PM |
SurfaceGui Adornee needs to be set from startergui/playergui for any events to fire for textbuttons n stuff
|
|
|
| Report Abuse |
|
|