T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
|
| 19 Jan 2017 10:47 PM |
I'm new to Filtering Enabled and I have to be able to change a players gui text after from a server script. How should I go about doing this?
|
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 19 Jan 2017 10:49 PM |
You don't.
What you do is tell the client to change it.
|
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
|
| 19 Jan 2017 10:52 PM |
I send a signal from the server script to the client. I cant access anything inside playergui so I cant just enable a local script or something to do it
|
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
| |
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 19 Jan 2017 10:58 PM |
| http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial |
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
|
| 19 Jan 2017 11:04 PM |
dude you cant call a remote event backwards.. I want to access a particular player's screen gui with a server script. I know how remote events work
|
|
|
| Report Abuse |
|
|
|
| 19 Jan 2017 11:09 PM |
"I know how remote events work" "dude you cant call a remote event backwards.."
|
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
|
| 19 Jan 2017 11:10 PM |
r u saying that I can send a remote event to the client from the server??
|
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
| |
|
|
| 19 Jan 2017 11:13 PM |
:FireClient(player, ...) or :FireAllClients(...)
|
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 19 Jan 2017 11:18 PM |
1. alternatively, if the server places the gui into playergui it is able to access/see/edit it
|
|
|
| Report Abuse |
|
|
T0XZ
|
  |
| Joined: 22 Sep 2012 |
| Total Posts: 260 |
|
| |
|
|
| 20 Jan 2017 01:10 AM |
| ACTUALLY... if the server gives the gui you can edit it, so when they spawn in give the gui that way and boom you can change it as you please... not so efficient but for like a spawn in gui its decent with fast tween'ing. |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 01:11 AM |
| Proof of concept: https://www.roblox.com/games/384256234/Lua-Basics |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 01:12 AM |
"not so efficient but for like a spawn in gui its decent with fast tween'ing."
No. Tweening should be done on the client.
|
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 01:13 AM |
"1. alternatively, if the server places the gui into playergui it is able to access/see/edit it"
But changes made to it by the client won't replicate.
|
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 01:14 AM |
| Don't need it to replicate just something to waste time, so its not an instant respawn... I fire the server to buy stuff inside the gui (local script) but I was just showing how the server can indeed edit the player's gui (if given by the server of course.) |
|
|
| Report Abuse |
|
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 20 Jan 2017 01:24 AM |
| Isn't manipulating GUIs from the server per this method a bit of a security vulnerability, esp. in a FE environment? |
|
|
| Report Abuse |
|
|
| |
|
mani_fold
|
  |
| Joined: 23 Dec 2016 |
| Total Posts: 546 |
|
|
| 20 Jan 2017 01:30 AM |
The point of FE is to remove the vast majority of the contact between client and server, namely by using remote events/functions to add a degree of separation; this 'contact' is the way that exploiters can manipulate things in workspace, etc..
So by manipulating PlayerGui, a clientside object, using a server script, one might be removing this degree of separation and ending up where one started before FE in the first place.
I could be wrong, and the fact that this workaround is an option sheds doubt on my theory, but it seems like this is a spurious method of gui manipulation in FE.
Imho i think using a remoteevent would be best... it takes five minutes and you'd be writing the same GUI coding in any case. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Jan 2017 11:43 AM |
| you cannot control gui's using server scripts, so if you were trying to enable a gui even if you were calling a fire client event, it would only work once, so local scripts is the best course of action |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 11:50 AM |
| Again, you CAN control the gui if you give it to the client from the server... and again I have an example of this: https://www.roblox.com/games/384256234/Lua-Basics and yet again its on FE. |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 11:59 AM |
okay, then try this code and prove me wrong.
A server script fires a remoteEvent to client side after every time the PlayerModel is added to workspace
the client side receives the remote Event, and Enables the gui. But on the first death of the player, the gui is not shown to be enabled, at least when you type outside of the function, but inside it is enabled, or it claims to be.
as a result, you end up with a gui not enabled after respawn of the player.
Try it yourself
call FireClient(player) and have a gui not enabled in starter gui
then in a local client type this code game.ReplicatedStorage.RemoteEvent.OnClientEvent:connect(function() ScreenGui.Enabled = true;
end) |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 12:00 PM |
| LOL, that's not even close to what I do but good try... the gui is given by the server and the server handles and changes it. There is no hey client move it for me, it just takes responsibility and does it. |
|
|
| Report Abuse |
|
|