I’ve been annoyed at the fact that you cannot fire a remote to only a select few clients, it’s either one client at a time or all of them. This is why I created this module and I decided to give it out to other who might have the same annoyance as me.
How it works
The module is works by essentially masking the remote instance, because of this you can use all the standard RemoteEvent methods as well as the custom one I created.
Why should I use this?
There are two main reasons you should use this module:
You get the FireClients method which allows you to pass an array of clients to fire
The module will wrap all your remotes automatically and store them in a cache, the benefit of this is that you only need to index the module and the name of your remote instead of indexing the remotes actual location
How do I use this module?
I made a little tutorial on how it’s used, I would have written something but I was having a hard time explaining it with text. Pardon all the mistakes and inefficient method of explaining everything, this video was made on a whim and was not rehearsed or scripted so it’s not the best quality lol. https://youtu.be/qlB0cOqPsXU
imo feels a bit unnecessary. Feels like putting FastSpawn or a function to deep copy a table into a module and proudly shipping it. It’s such a simple utility to write that by the time they’ve come to DevForum to find and add your module to their game, they could have written the code themselves and moved on. I have no problem with utility modules, but you have to pack in enough utilities to make it worth using.
You make a good point, the project I am working on has a lot of uses for that simple method and that’s why it was created. I put a decent amount of effort into making the transfer from regular usage to this module rather seamless so I thought might as well release it to the public. I am aware it’s usage isn’t very broad and that the code is simple, just trying to put it out there for the people who might find a use for it.
Wouldn’t you need to iterate through players to populate the array in the first place, and then iterate the array to fire to the client? That’s two loops.
It sounds like simply one loop, checking whether it is a player you wish to fire to with a condition, and firing to the client from there isn’t that much more of extra work, and has 1 less loop. To only have 1 loop with this module assumes you’ve already got a pre-populated array which most of the time won’t be the case.
It was the case in the context I created it for, again I made this for myself and just decided to release it since I thought maybe some people might have a use for it