Gahdzilla
|
  |
| Joined: 09 Jun 2016 |
| Total Posts: 351 |
|
|
| 01 Nov 2016 03:46 PM |
| Ok so i have a script in a brick. It has a touched event. I have a line where i checked for humanoid. But im not sure how to make the gui visible for the player after he touches it. You cant use LocalPlayer because it is not a local script. Please help me figure this out |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:48 PM |
local player = game.Players:GetPlayerFromCharacter(character)
You can do that, as in a touched event you DO have access to the character. |
|
|
| Report Abuse |
|
|
Gahdzilla
|
  |
| Joined: 09 Jun 2016 |
| Total Posts: 351 |
|
|
| 01 Nov 2016 03:50 PM |
| With 'local player' can i then access localplayer and playergui from there or am i missing something? |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 03:51 PM |
If ReplicationFiltering(AKA FilteringEnabled) is on then you would have to use a local script to manipulate the PayerGui(and possibly the character since that's linked to the client).
Otherwise a server script can manipulate PlayerGui |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:54 PM |
| Yes, with the :GetPlayerFromCharacter you can access the playerGui and everything else you'd be able to with the LocalPlayer in a local script. |
|
|
| Report Abuse |
|
|
Gahdzilla
|
  |
| Joined: 09 Jun 2016 |
| Total Posts: 351 |
|
|
| 01 Nov 2016 03:54 PM |
| So i should put a script in serverscript service and do it from there? |
|
|
| Report Abuse |
|
|