Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Where should RemoteEvents be located?

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

✓ Accepted answer

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).

1 comment

0

Thanks. :)

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.

3 comments

0

Okay.. but when would it be appropriate to store events in Workspace or Tools?

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.

0

Thanks for helping, I understand it more now :)

This discussion is preserved as it was. New answers, comments, and votes are closed.