How to make server wide death script

ok thx for the feed back , ill test the script real quick

If he has the enemies or players in a folder he should be fine. 1k parts isn’t bad for iteration unless your doing functions on each of them. All it is doing is checking the classtype of the object.

yes all im doing is checking if its a humanoid , btw ty for the script ! worked perfectly

1 Like

If they share a folder then yea, best bet is to loop over the folder. But it all comes down to how optimized he wants to be. If he wants the “cleanest” and most efficient way it would be modules, or collection service, or have all the enemies share a parent and loop over that.

1 Like

yes thats also a good point , i dont have a full understading of collection service or OOP/Moduals . Thanks for ur feedback , ill make sure to learn about OOP and moduals to help “clean” the script