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

Does a large amount of minor scripts in workspace affect server/game performance?

Asked by 4 years ago

I am using a simple script for doors/light switches that works by having a script in every single on of the interactable parts in the workspace like the physical door or lightswitch. A friend who is a scripter recommended that I don't do this because it will saturate server memory and cause lag. Is this true? If the code is only being triggered by a clickdetector and onMouseClick wouldn't it only draw resources as needed when called to do so?

My final question is, how secure is my practice? Light switches/doors seem non-consequential to me in terms of a exploiter taking advantage of them because I don't see any advantage of them tampering with these sole scripts in the workspace.

Thanks.

0
How many scripts are there? jwklong 32 — 4y
0
the scripts are located in each individual door/light switch, I estimate there may be 1,000 doors with a script inside each one and 2,000 lightswitches the same way. It shouldn't be a problem if they're not all active and rely on player input. arjun9022 34 — 4y
0
Have you tried testing it in-game and see how much lag there is? jwklong 32 — 4y
0
in-game in a work-in-progress map with 10 people there is no lag what so ever, my concerned friend is worried about the long term effects of my current practice but I don't currently see no lag at all in this current small scale. arjun9022 34 — 4y
1
While it may not create lag because of the scripts purpose, you definitely don't need a script for every part and should convert it to one script. It's not always just about lag but efficiency and scalability. Imagine having to edit 2k scripts vs 1. Azarth 3141 — 4y

1 answer

Log in to vote
0
Answered by
jwklong 32
4 years ago

Seems to be good, if it doesn't lag for you right now, it probably won't lag ever. If it does start lagging, you can always come back to the forums.

Ad

Answer this question