|
| 17 Nov 2014 07:58 PM |
So I have a BoolValue inside a Player, and a global script that checks it, and a regular script that unchecks it. The issue is that when the LocalScript unchecks it, it doesn't go to the server with FilteringEnabled (not sure if supposed to or not), and as a result, server scripts still think it's checked.
Any way around this? Is this supposed to happen? |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Nov 2014 10:20 PM |
| Can you be more specific? Can you tell me why this doesn't work by default and how to structure the code? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2014 08:58 AM |
This doesn't work because what FilteringEnabled does is prevent all the requests from the client to alter other clients/the server. So changing something from a LocalScript will not show up for other players, or the server. As a solution for this, ROBLOX created 2 objects called RemoteEvents and RemoteFunctions, both of which have the purpose to cross this boundary created by the client not being able to change stuff, and they solve it by sending "signals" to and from the client to the server, which scripts can then react to.
Tutorial on the wiki: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2014 09:20 AM |
| I know, but I didn't know that that was also the case with values inside players, thanks! |
|
|
| Report Abuse |
|
|
Akahashi
|
  |
| Joined: 26 Aug 2012 |
| Total Posts: 24 |
|
|
| 18 Nov 2014 11:49 AM |
I really don't see how FilteringEnabled is useful, it only make everything wrong and to correct, you need to put useless hard work... My game works fine without it.
-Egzekiel |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Nov 2014 11:52 AM |
"I really don't see how FilteringEnabled is useful, it only make everything wrong and to correct, you need to put useless hard work..."
-More exploit proof -Astounding amount of control over things -Super simple to do local parts, local lighting, local sounds, local anything -Easier to work with projects due to the huge amount of control you have over the game -Definitely not useless hard work
5/5 would never stop using FE |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2014 12:16 PM |
The only reason for not using FilteringEnabled would be responsiveness and not having the server-client data sending delay. Is your game super fast paced and feels sluggish using FilteringEnabled? Don't use it. Otherwise, do.
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2014 05:04 PM |
Thanks, problem solved!
@StealthKing95
For me, it's hard to get a game not FilteringEnabled to FilteringEnabled lol. I haven't tried creating a new game from scratch with FilteringEnabled in mind yet, but I imagine it's eaiser.
@filiptibell
Do you know how to get rid of the delay? Not sure if the ROBLOX Wiki article applies to my situation. Also, the delay doesn't exist in Studio test server mode, does that mean the delay won't exist online?
|
|
|
| Report Abuse |
|
|
|
| 21 Nov 2014 05:09 PM |
The delay is due to clients needing to send data to servers, and then recieve data back. For some players, that server can be half way across the globe, so the delay is due to physical distance (kinda hard to get rid of :P) between the players and the server.
I suggest reading this wiki article, it's extremely helpful and I've had quite some use for it: http://wiki.roblox.com/index.php?title=Fighting_Lag
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 Nov 2014 07:01 PM |
Basically, you'll want to start using FE if you want to start understanding client-server network models for games.
RemoteEvent just sends for an RPC by the server. The client doesn't have to wait, and the rest of the script carries on asynchronously to the server. If Roblox is being Roblox, it uses reliable packet methods and waits for an acknowledgement from the server. RemoteFunctions are similar. They send for an RPC, but secretly they also set up their own listener at the same time. When the procedure is invoked, the original RPC source waits for the return value, and then uses the network instance/identification from the original request to send the value back. This happens synchronously, and can cause some real issues if you're not doing stuff right. If you need an asynchronous RemoteFunction for some reason, then you can use a RemoteEvent, pass a RemoteEvent(Or name) as an argument and listen for the response on that. |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2014 07:02 PM |
@eLunate Curious, what does RPC stand for?
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
|
| 22 Nov 2014 05:27 PM |
| Thanks. I'm using RemoteEvents currently. Which is easier to have the least lag possible? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2014 05:30 PM |
| remotefunctions minimises latency |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 22 Nov 2014 05:31 PM |
| RemoteEvents are the best for reducing lag if you don't need a return value. If you want to have less lag but still need the value then try the async method I suggested |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2014 05:32 PM |
What's the async method you suggested? Couldn't find it after reading the entire thread lol.
Also, I think I figured out the main reason why I'm having issues in general with FilteringEnabled, which is that I have localscripts editing values, then firing the server to change the values, when I could just fire the server from a localscript to change the values, since everything from the server gets replicated to the client. Is this correct? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Nov 2014 09:43 AM |
" If you need an asynchronous RemoteFunction for some reason, then you can use a RemoteEvent, pass a RemoteEvent(Or name) as an argument and listen for the response on that. "
That's how RPCs for returning functions are designed to work when you do proper game development |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Nov 2014 12:15 PM |
this is y u dont help people with fe they never learn how to use it anyway |
|
|
| Report Abuse |
|
|
|
| 27 Nov 2014 12:16 PM |
@BothAngles
Lol. If no one learns how to use it, how is it being used? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
|
| 27 Nov 2014 12:49 PM |
| because the people who know how to use it learned from the wiki |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 27 Nov 2014 12:58 PM |
| 1 L34RN3D HOW TO US3 1T FROM MY P4ST 3XP3R13NC3 1N G4M3 D3V3LOPM3NT |
|
|
| Report Abuse |
|
|