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

Is it good or bad to have a lot of remote events?

As my game goes deeper into development, I find myself using a lot of remote events (most of them are used to spawn items from the same GUI). The question is whether my game is prone to breaking if there are too many of them. If so, is there a way to limit the amount of them so that clients can still spawn items using remote event?

2 answers

✓ Accepted answer

Adding too many RemoteEvents will make game loading times slower (not sure, but too much of anything wil slow down your game), so it would be wise to use the parameters feature of RemoteEvents to spawn in different items. Local (enclose in a clicked event for a gui)

game.ReplicatedStorage.SpawnItem:FireServer(1)

Script (not very efficient but just an example):

game.ReplicatedStorage.SpawnItem.OnServerEvent:Connect(function(item)
	if item==1 then
		--item 1
	elseif item==2 then
		--item 2
	end
end)

1 comment

0

Do you have any source which can back up your claim that too many remotes make game loading times slower?

There's no limit of how many remotes you can have, nor will they cause your game to break. Though if you do have too many of them, it might be easy for you to get confused or forget which does what, etc.

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