Hello! So is it better to have different functions in different scripts or could they all be in one script? Like when I want to unancor a part and play a sound in it, should I make 2 separate scripts or is it better to do this with one. Which is fps whise better?
✓ ANSWER ACCEPTED
Does having more than 1 different functions in a script have a less performance impact?
1 answer
✓ Accepted answer
its not bad to have multiple functions in a script and I think it would actually help to have them in all in one script. for one, sometimes functions reply on eachother so its simpler to have them together.
anchoring a part and playing a sound in it are both extremely simple though so they'd definetly go in 1 script.
ive seen very advanced API models spanning 1300 lines in 1 single script and it works without any lag. so performance is not affected by how many scripts you have. but im not saying to put 1300 lines in 1 script, do everything so its organized and you know what going on and in reason
This discussion is preserved as it was. New answers, comments, and votes are closed.
