G-Lab [UPDATE] - Reducing Server Load

The functions running with these parameters shouldn’t worry about keeping both grabConstraints in mind when only one is needed per call.

Since both Lever and Cog objects behave pretty much the same way in terms of constraint type and Network Ownership, they could be translated into a single boolean.

rootPart and grabObject were also packed into a sub-table to reduce the number of things to be unpacked from the main params table.

Since there are multiple checks to see if the grabObject is a Lever or a Cog, but they both use the same attachment method, the checks can be combined to essentially treat grabObjects with either tag as being one in the same.

rootPart and GrabObject turn into focus[1] and focus[2] to act as shortcuts without the need to be unpacked or given unique variables.

Also the lightswitch is a ball now, get mad

1 Like

You can check out the beta here.