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

What would be the correct object to use in this scenario? A BindableEvent or ModuleScript?

Asked by
Klamman 220 Moderation Voter
4 years ago

I'm in the process of making a game and constantly find myself needing to cross-reference tables and objects that are defined in other scripts. For example, I have a script that manages the inventory GUI (highlights icons, for example), but another script that equips tools. I've just been using bindable events to communicate between scripts (in this case, the tool-equipped script tells the inventory GUI script to highlight the proper slot), but I've accumulated quite a few bindable events at this point (these are all client-side, by the way). I'm worried that I'm using unnecessary resources.

Would I be better off using ModuleScripts to accomplish this? I've never used them before, and am just looking for a little guidance.

1 answer

Log in to vote
0
Answered by
B_rnz 171
4 years ago
Edited 4 years ago

[ ill take the rep, lol ]

Yes, and No.

[Bindable Events]: If you're not used to using Module scripts, don't use it on projects, save that for experiments.

[Module Scripts]: If you're keeping everything Modular, neither efficiency nor security is gonna be a concern here because all the player data should be handled entirely on the server.

Ad

Answer this question