|
| 17 Apr 2015 08:22 PM |
Is it possible to get the Player who clicked a screen gui when the script is in ServerScriptService?
function onClicked(GUI) end game.Players.nameOfWhoClicked.PlayerGui.NameOfGui.NameOfButton.MouseButton1Up:connect(onClicked)
can you use this MouseClick:connect(function(Plyr) some how? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 17 Apr 2015 08:25 PM |
The gui is in the PlayerGui right? The PlayerGui is in the Player
local player = gui.Parent.Parent |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2015 08:29 PM |
| yes but the script is in ServerScriptService |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 17 Apr 2015 08:31 PM |
screen guis
do not
do
not
go inside server script service
they go inside the startergui
which copies them to the playergui which is in the player |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 17 Apr 2015 08:32 PM |
misread
why is your script in serverscriptservice
(lol thought you put your gui there)
it should be a localscript most likely in some part of the gui you are controlling
so you can access the player easily |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2015 08:35 PM |
| i understand that. yes the gui is in the starter gui.i am asking Is it possible to get the Player who clicked a screen gui when the script is in ServerScriptService? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
|
| 17 Apr 2015 08:54 PM |
| ok thanks, i am reading now. does FilteringEnabled need to be true to use RemoteEvents? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 17 Apr 2015 08:55 PM |
| No, but if FE is on, then you need RemoteEvents. I just never change anything inside the player from a script |
|
|
| Report Abuse |
|
|