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

Does disconnect functions help with server lag?

Asked by 6 years ago

Title says most of it. Basically my game suffers from server lag cause of the effects of it, would disconnecting every function in my scripts help?

0
what do you mean by disconnecting every function? not sure what you mean SuperKirbylover 107 — 6y
0
Like for example there's a function called "healingFunction" then I would do healingFunction:Disconnect() So would disconnecting all my functions when im done with them gonna help the server lag LuaPrescott 2 — 6y
0
Definitely would help. I believe there's a tab in the developer console that allows you to pinpoint where your lag is coming from, or you could use profilebegin/profileend. NewVoids 97 — 6y
0
You mean disconnecting events? I haven't heard of a disconnect on functions before Vulkarin 581 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

The "disconnect()" feature on ROBLOX is useful in many ways. For example, if you want to disconnect a function that has been running for a great amount of time, you can easily use the :disconnect() after that function name to disconnect the function from the ROBLOX game server. However, if your server has lag all the time, I suggest looking more into the scripts then just the functions in them.

0
i had no idea about the disconnect feature! i'll have to keep that in mind SuperKirbylover 107 — 6y
0
The thing is when there is a lot of effects in the workspace, it starts lagging, is there any way to prevent this? LuaPrescott 2 — 6y
0
If you are cloning these effects into Workspace, it will eventually cause lag. However, there is a fix to this problem. Their is a a part of game service called "Debris." Once you use Debris, you can get rid of every effect that you don't need after a while. Simply type, and example, "game:GetService("Debris"):AddItem(ObjectHere, SetAmountOfTimeBeforeObjectIsDeleted) FireyMcBlox 134 — 6y
Ad

Answer this question