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

is it better for one script to handle all the parts in workspace?

Asked by
0msh 333 Moderation Voter
4 years ago

Say if I have a master script in ServerScriptService, it controls everything in the workspace such as:

when player touches a part, they get damaged

when player move into a certain range of a monster, the monster will start chasing them

when the monster die, it respawns, continuously

The main goal is to reduce lag and the amount of scripts running at once, but I'm not sure if it'll work as efficient or it would really reduce any lag due to how many things one script has to handle at once.

Any answer will help, and will definitely accept the best answer given. Thank you.

1 answer

Log in to vote
0
Answered by 4 years ago

Hmm. I'd recommend using multiple scripts, as then it would be easier to tell what a specific function is for, etc. Having one script still works though, and your game will still work the same as if you had many scripts. Whichever you think is easier to work with, I'd go for.

Ad

Answer this question