doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 08:05 PM |
| I understand what F.E. does, but apparently I can let some scripts have that client server connection by using RemoteEvent. Can someone explain this to me? Thanks! |
|
|
| Report Abuse |
|
|
mathchamp
|
  |
| Joined: 22 Oct 2007 |
| Total Posts: 320 |
|
|
| 17 Sep 2014 08:28 PM |
If you call the RemoteEvent's FireServer event with a local script, the OnServerEvent event will be fired on the server. The first argument passed to the event is the Player who fired the event, and the remaining arguments are the arguments of FireServer.
e.g.
--in local script RemoteEvent:FireServer(a,b,c,...)
--in server script RemoteEvent.OnServerEvent:connect(function(player,a,b,c,...) --stuff goes here end)
You can go the other way, too. FireClient takes a Player argument before the event arguments, and fires OnClientEvent for that player only. FireAllClients will fire OnClientEvent on every client.
e.g.
--in server script RemoteEvent:FireClient(player,a,b,c,...) --OR RemoteEvent:FireAllClients(a,b,c,...)
--in local script RemoteEvent.OnClientEvent:connect(function(a,b,c,...) --stuff goes here end) |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2014 08:46 PM |
| fe doesnt prevent exploits so dont use it |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 09:14 PM |
| it prevents people messing with values |
|
|
| Report Abuse |
|
|
|
| 17 Sep 2014 09:15 PM |
that can be scripted plus fe is hard to use trust me asimo told me |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 09:15 PM |
| So I am correct in thinking I can use local scripts with this? |
|
|
| Report Abuse |
|
|
mathchamp
|
  |
| Joined: 22 Oct 2007 |
| Total Posts: 320 |
|
|
| 17 Sep 2014 09:15 PM |
| It can prevent or at least greatly reduce the most destructive exploits. Stuff like speed hacking or gravity hacking still works, and other methods must be used to combat those. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 09:37 PM |
| Any idea why my there are no GUIs in my players? Do I need to clone them in? |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 09:38 PM |
| ACtually when I start a server I can only view the models from the position of the player. Not on the server window. I guess that is what FE does. So how do I access GUI from a normal script? |
|
|
| Report Abuse |
|
|
Bobobob12
|
  |
| Joined: 23 Jan 2008 |
| Total Posts: 5350 |
|
|
| 17 Sep 2014 09:56 PM |
GUIs generated in a localscript will only be instanced for the Client as said command would be filtered
if there were TRUE filtering, then attempts to make clientside adjustments would do nothing due to mismatch. but right now you can just make parallel universes of the sorts + roblox relies too much on clientside heavy lifting because poop tier servers so it'll probably stay that way for a long time.
tldr don't use filteringenabled unless you want to specifically make certain things only appear clientside (and you can already do that by loading bricks into currentcamera) |
|
|
| Report Abuse |
|
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 17 Sep 2014 10:02 PM |
| @BothAngle: Why waste the time with a complex script that could easily be disabled or destroyed by somebody with client access to the server when you can simply check a value that is stored on the server that prevents client access to the server? The choice is clear to see. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 17 Sep 2014 10:13 PM |
| I still don't understand how I'm supposed to access GUIs from server scripts. I load GUI data using data store and that is not for local scripts. |
|
|
| Report Abuse |
|
|
mathchamp
|
  |
| Joined: 22 Oct 2007 |
| Total Posts: 320 |
|
|
| 17 Sep 2014 10:30 PM |
Have the server script outside the GUI, use RemoteEvent or RemoteFunction to communicate between the GUI's LocalScript and the server script.
If you REALLY want a GUI to be accessible by the server directly, use a server script to manually clone it into the PlayerGui on spawn. You just have to be careful as if you later modify that GUI with a local script, the server won't see the change. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 18 Sep 2014 03:42 AM |
Since there are people who experienced using remote events,please try to help me out here... http://www.roblox.com/Forum/ShowPost.aspx?PostID=146237503 |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 04:21 AM |
Mathchamp, when FilteringEnabled is on, server scripts CANNOT access PlayerGui. Local scripts CAN access it. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 18 Sep 2014 05:03 AM |
Unless your trying to access other clients PlayerGui's from a client that won't work either unless you access it like this Client>Server>AllClients
|
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 18 Sep 2014 06:52 AM |
| So using a RF, how would I just get access in the GUI? I don't care about the local scripts, I just need to change number values and Visibility of the GUI. Any good tutorials? |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 18 Sep 2014 07:06 AM |
| Change the Gui of all the clients or just the one who triggers the remote function/event? |
|
|
| Report Abuse |
|
|
oseday
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 1308 |
|
|
| 18 Sep 2014 07:27 AM |
| With FE normal scripts can't run on PlayerGui. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 18 Sep 2014 10:56 AM |
| ose, if this were true, there would be no reason to have data save because I can't access any values in the player. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 18 Sep 2014 11:30 AM |
| and KO I just want to change a specific persons, GUI properties. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 11:36 AM |
@Doneyes it IS true. Script cannot interact with PlayerGuis when FilteringEnabled is on. LocalScripts cannot change the game.
Yes, that would be pointless, if they really had no way of getting data from the client. Actually, the whole game would suck with FilteringEnabled, because you can't change the game with LocalScripts.
That's why you use RemoteFunctions and RemoteEvents. http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 18 Sep 2014 11:49 AM |
| But Unfortunately they cause double the lag. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 18 Sep 2014 12:00 PM |
| Do big name games with stats like Apoc rising and murder mystery use FE? I must have it? |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 12:54 PM |
Some big-name games do, some big-name games don't. Apoc. Rising is being converted to using FilteringEnabled and Clone's Murder uses FE. That League of ROBLOX game that was popular for a while was the first major FE game. Super Bomb Survival is FE. Twisted Murderer PROBABLY uses FE, but I don't know. Basically, all the better games use FE.
Also, don't listen to anyone that says FE increases lag. It can actually REDUCE lag, if you use it right, because you only need to replicate important changes. For example, if you want to do weld-based animations, you can tell the client what other players are doing, and the client can animate them. That'll result in the server not doing any animations and only sending 2 numbers per animation if done right, meaning that you send a LOT less data. Consider that each CFrame requires at least 6 numbers to send (pos, axisangle), and if you've got 5 welds changing once per frame that's 6*5*30=30^2=900 numbers per SECOND per PLAYER being sent to all players. If we've got a game of 10 players, all being animated at once, that's 9000 numbers per second. With FE, if done right, you can reduce it to 2 numbers per player per animation (or even 1 if you don't want it synced up between players), so if you've got a 1 second animation, that'll be 2*10=20 numbers per player, once.
^massive blob of text, but it's important |
|
|
| Report Abuse |
|
|