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

Where should RemoteEvents be located?

Asked by 6 years ago

I usually put RemoteEvents in the main object (ScreenGui, Part etc.) but I heard that we should place it in ReplicatedStorage? If so, why?

2 answers

Log in to vote
0
Answered by 6 years ago

You don't have to -- it's almost solely a matter of organization. You probably won't want any RemoteEvents in ServerStorage, since then client scripts won't be able to access it, but otherwise it's up to you.

You should come up with a system that makes sense and will be easy to use. If you put a RemoteEvent in, say, workspace.Part, that's going to be very difficult a script to access unless it's a direct child of the RemoteEvent. In contrast, putting all RemoteEvents in various Folders in ReplicatedStorage could be an easy-to-use system (and if you don't have that many RemoteEvents, you don't even need folders).

0
Thanks. :) Florian27 76 — 6y
Ad
Log in to vote
1
Answered by 6 years ago

Because the contents of ReplicatedStorage can be accessed by any client and the server.

From the wiki:

In order for both the server and clients to utilize RemoteEvents, the RemoteEvent object itself must be in a place where both can see it. It is recommended to store RemoteEvents in a folder inside of ReplicatedStorage, although in some cases it is appropriate to store events in the Workspace or in Tools.

0
Okay.. but when would it be appropriate to store events in Workspace or Tools? Florian27 76 — 6y
0
Whenever you find it more convenient to do so. Personally, I preffer ReplicatedStorage. This way I can easily keep track of what events I'm using even when I come back to a project after a long time. Programical 653 — 6y
0
Thanks for helping, I understand it more now :) Florian27 76 — 6y

Answer this question