Brax's Utils - A module of various assorted functions

I just uploaded a utilities module (open sourced, don’t worry, not concerned with theft on this one) and figured I’d share it here. The main features it possesses is the ability to resize a model via function to fit in a certain bounding box (so you can effectively have a Size value for Models) and the ability to create and get points on Arcs, which behave like Rays and even feature a function for what I call arc-casting (ray-casting along the arc). It also can be used to bypass the ray length limits by setting the gravVector of a ray (arc.g, or the last constructor argument) to Vector3.new() and giving it a segmentLength (third argument, or arc.l) of less than five thousand.

If you have any questions, feel free to ask, and please, tell me if there are any functions you commonly use that are missing. I will be maintaining this utilities module.

11 Likes

Screenshot of an arc (visualized using Parts)


I also fixed a bug that would cause the module to crash when arc-casting.

Updated with two new functions - disableMotors (which disables all JointInstances, such as welds and motor6Ds under the parent) and disable (which disables a targeted object)

Both parent said objects to nil, so you will want to store the result. Both functions can be undone by calling .enable() on their return values.

DisableMotors was intended for ragdolling; disable is intended for more general purpose uses such as disabling specific joints so you can manually use non CFrame forms of animation.

Just pushed an update that added two new properties to the return values of the new functions.

disableMotors().joints is a folder of all the JointInstances the function disabled.
disable().object contains the disabled object.

Also fixed a crash bug I accidentally reintroduced when uploading the last version of the module.

Slight issue/PSA: The disable functions have a serious tendency to destroy anything you use them on. I’m working on a fix, for now i would not advise using the disable functions.

Sorry! :frowning:

I pushed a potential fix for the disable functions. Please be careful using them for awhile and tell me if you lose any objects to them.