Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 15 May 2016 04:52 PM |
function onClick() print("Click") end
script.Parent.MouseButton1Click:Connect(onClick)
thanks
i dont think i need to mess with adoree for this since i dont care who clicks |
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 15 May 2016 04:52 PM |
| MouseButton1Click works only on the client, not the server. |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 15 May 2016 04:57 PM |
| ah. any easy alternatives or should I work it out |
|
|
| Report Abuse |
|
|
|
| 15 May 2016 04:58 PM |
1. There's no reason to have a script work with a GUI.
2. Working in Studio but not in a server is always because all scripts act as localscripts in Play Solo.
|
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 15 May 2016 04:59 PM |
| An easy alternative is having the gui controls done on the client. This way you have access to the user's inputs (including keyboard and mouse). |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
| |
|
|
| 15 May 2016 05:00 PM |
You only use LocalScripts client-side, never scripts.
|
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 15 May 2016 05:00 PM |
thanks locard,
justgetitdone why would you not want guis to interact with scripts |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 15 May 2016 05:03 PM |
I'm confused is this a new ish thing?
There are posts like this
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=128954569
and i have a post from awhile asking how to get player from a click on a surface gui and it was not possible although you could register their clicks |
|
|
| Report Abuse |
|
|
|
| 15 May 2016 05:03 PM |
Surface GUIs are very different from screen GUIs.
|
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 15 May 2016 05:10 PM |
very true and i messed up my title, im working with a surface gui
on my other thread 2 years ago i made the same mistake |
|
|
| Report Abuse |
|
|