Is it smart to have more than one RemoteEvent in a script?

not really any code, just want to know if its smart to send more then one type of RemoteEvent in a single Script.

doesnt matter, to reduce clutter you can just use one and use arguments to define what you want to use it for

1 Like

What I generally do, is use one Remote Event/ Remote Function, but optimize it so it works for numerous tasks. e.g: a user sends in the type of action they’re performing.

example:

game.ReplicatedStorage.SomeRemote.OnServerEvent:Connect(function(player, event, ...)
local args = {...}
if event == "blah" then
--//something here
end
end)
1 Like

It is smart to do so for different things as it will be more organized. For example, you can have a remote to when a player clicks a certain button, and another one for when they enter something in a textbox. Having one remote event can get out of hand and your intentions can get mixed up. When a Server receives the remote event firing, it will only happen in one function. It wouldn’t be easy to manage many things under one function.

Short answer, yes, use multiple for better organization (of course, keep it reasonable though).

2 Likes