A basic memory/lag question related to Events

Since I’m no good at knowing what takes memory and what doesn’t, I have a few questions:

-Does hooking a PlayerAdded event once vs 20 times make a difference in lag? In my game, to be efficient, I have like 20 different scripts each titled with their own purpose, and to make it so each script does its own function, each script has a PlayerAdded event attached.

So, is this efficient, and can it affect lag/delay?
As I said, I never got the answer to this question since I started programming and I thought I’d address it now.

2 Likes

You could connect hundreds of functions up to it without issue.

The only time it will matter is completely dependent on what happens within the connected functions. Most likely, you’re fine. But if you’re running extensive operations within those 20 functions, then maybe there could be an issue.

3 Likes

Great to know, thanks. It must be an issue with textures.