BodyForce API Documentation code demonstration shows code typos

Hello! In the BodyForce API documentation under the Body Movers category, there is a sample or example of code for the BodyForce that shows an example of how to use the Force function/variable in certain situations whenever inside Roblox Studio using the example or for other particular reason:

chrome_huPxXbVkwY

There aren’t any local variables to determine and make the code function or run well and with the duplication of bodyForce on the 3rd line, there “might” be a substitute but for beginner developers, there should be a proper explanation and code demonstration of what each line does.

magnitude = 100
left = Vector3.new(-1, 0, 0) * magnitude
bodyForce.Force = bodyForce.Parent.CFrame:vectorToWorldSpace(left)

Not shown above, but all the variables like magnitude, left, and bodyForce all have errors indicating an unknown symbol or an unknown symbol inside the Script Analysis Tool property.

Instead, it should have some local variables at the beginning of magnitude, left or/and bodyForce as the code doesn’t make sense to me nor to any developer when putting this inside a Script to test. It is a terrible example and code for new or present developers to view and use due to that the code uses the legacy version of code and should update with a better understanding of what each variable or function means, would be nice if this was updated. :slightly_smiling_face:

Hey!

Thanks for reporting this, I’ve just added it to our todo list. We’ll get to it when we can!

3 Likes