Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Replicated Storage and LocalScripts - Is it Bi-Directional?

Asked by 9 years ago

Is it true that a Part instance or model parented to ReplicatedStorage from a localscript (on the client) does not get replicated to the Server? I am seeing this issue now, and it has lead me to believe that the replication that happens is soley from server to client, and can't happen the other way around.

Also with an ObjectValue set by the server with nil value, if a value is assigned by a localscript (client), it not get replicated and accessible by the server- renames nil.

So is it true that the replication is not bi-directional?

-Jason

2 answers

Log in to vote
0
Answered by 9 years ago

You can test this on your own. Set workspace.FilteringEnabled to true (or false) and start a server with one player. Now, from the explorer in the client's view, add objects to the various containers.

When I did this, I found that, regardless of FilteringEnabled, the following containers only do server->client: ReplicatedFirst, ServerStorage, ServerScriptService, TestService, Teams, StarterPack, and StarterGui.

The following containers don't replicated at all: HttpService, SoundService

Objects in the other containers are replicated in both directions if FilteringEnabled is false.

If FilteringEnabled is true, this disables most client->server replication (which is the whole point of the property). I believe the exceptions include player position and animation.

You want FilteringEnabled true to prevent certain types of hacking. If you need the client to communicate with the server, you need to use RemoteFunctions and/or RemoteEvents.

0
Ok, thanks. Yes I ended up doing some extensive testing. I've come to accept how Roblox handles things - the basic answer is "no", communication is not bi-direction from client to server within ReplicatedStorage - the client can't modify anything created by the server, but can use Events created by the server for making calls to it. JasonTheOwner 391 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Actually, ReplicatedStorage is the ONE area accessible by both client and server, when FE is enabled, but what happens is the client can not modify anything located there - everything placed there is read-only - all your remote event hooks and remote functions can be placed in ReplicatedStorage by server code for access, but the client can't make any additions or changes that the server can access..

So replication CAN happen but its one way from Server to client, and only in this one area or namespace of a game.

-Jason

Answer this question