|
As you may know, most client>server communication does not affect the server. The best way to get around this is Remotes (Functions&Events). As you may know, depending on the server load these may take a while to load. So, if you take advantage of the fact that even though client>server doesn't affect the server, it affects you.
E.g.
if I wanted to make a part colored, i'd do
game.ReplicatedStorage["colorRemote"]:FireServer(workspace.Part,BrickColor.new("Brick red")) --sets it red for server
Instead of just that, where it takes some time to show for the player, you should do this:
workspace.Part.BrickColor = BrickColor.new("Brick red")--sets it red for client
game.ReplicatedStorage["colorRemote"]:FireServer(workspace.Part,BrickColor.new("Brick red"))--sets it red for server
See what I mean? |
|
|
OzzyFinJoin Date: 2011-06-07 Post Count: 3600 |
due to latency I do every visual thing client side
FireServer(change)
--do change this client's side
FireAllClients(plr,change)
OnClientEvent(plr,change)
--check if plr isn't localplayer
----do the change
|
|
x_oJoin Date: 2015-06-04 Post Count: 4378 |
I think most people with an understanding of networking know to do this
|-/ |
|
|
|
@above of course, but some people here have no clue about networking so i thought i'd share that info with them |
|
|
But now try and clone something then there would be 2 models for the client
|
|
|
Anyone with networking experience would know this is cancer.
Don't send userdata over REs, unless you _absolutely_ must.
A much cheaper (faster) method is to do something like this. Either parse a string or use the name.
```
RemoteServerEvent:Fire("workspace.Part", "BrickColor", "Red")
```
that is much faster than sending userdata.
If you want to be even faster, define some number codes to use
```
RemoteServerEvent:Fire("PartsName", 0x0B, 0x05)
```
If you have the server check the numbers and do stuff accordingly, you can save a *lot* on latency. |
|
|
Where do you learn this stuff?
~CrayBray |
|
|
@85, wiki, experience, common sense and this forum
|
|
|
@85, wiki, experience, common sense and this forum [2] |
|
|
mk, ty. I'll stick around then.
~CrayBray |
|
|
It's worth it. You'll meet some really cool people who are amateurs and enthusiasts, and then eLunate, who can be terrifying and brilliant in equal measure. But to truely be inducted into this forum, you must post '^' here: http://forum.roblox.com/Forum/ShowPost.aspx?PostID=161053264
Now, go in peace, brother
|
|
|
O lol sorry. Better way to make it faster, if you are a stuck-up prick about 3 bytes.
Change `0x0F` or whatever to one character.
Example:
```
ServerRemoteEvent:Fire("PartNameHere", 'F', 'B')
``` |
|
TimeTicksJoin Date: 2011-04-27 Post Count: 27115 |
Well danm, I've been sending userdata over REs because its easier to manipulate things lol... |
|