Would using one serverscript to control a everyones knives cause lag?

So I have a knife system, which uses one central serverscript to control everything. It works fine, but I am worried about when it gets to 20 players. Would it cause lag if I use only one instead of a seperate one for everyone?

I don’t know why you have a script controlling all. It would be better to have a script for each knife.

1 Like

Would it cause any noticeable difference?

I dont know, but I see no reason to have one script do it all. It’s all this work for one script when it can be split into little scripts.

I wouldn’t worry about an issue that doesn’t exist for me (lag being in this case, you’re just worried it might happen).

1 Like

It wouldn’t necessarily cause lag, but it’s just unnecessary. You’re much better off just using individual scripts for each knife instead of one central script. (it only really lags if you have an infinite loop, whether it be a while true do or a repeat, in your script)

1 Like

This thread is too vague, it lacks any kind of detail about what’s going on behind the scenes. The answer here is indeterminate until you do provide that information. That being said: whether a single script will cause lag or not is purely circumstantial and up to what exactly your server is doing.

Personally, regardless of whether it does cause lag or not (which it really won’t, it depends on your code), I would opt to not do this. I prefer keeping my readability, comfortability and sanity in tact.

1 Like