Help Understanding Formulas

So I am trying to understand how the Pistol model found in the map ‘Combat’ (made by roblox) works. These formulas are found on line 56-61 in a script called ‘Pistol Script’ Parented to the Pistol.

Here is the formulas/equations (found in the model ‘Pistol’, in the ‘Combat’ map which is found when you first open roblox studio):


I don’t understand what these equations do, or how they work. Can someone please explain? Thanks :grinning:

I can briefly explain what everything does, I’ve never actually used the model:

waitBetweenSegmients = I’m assuming this means the ray creation rate

segmentsPerSecond

The amount of rays created in one second, to avoid unnecessary equations.

numSegments

Calculating how many rays will be created

segmentLength

Calculating how long each ray will be

dropPerSegment

Simulating drop physics, meaning that the rays won’t just go straight forward, it will drop down more and more each time

dropAngle

The angle, or intensity of how much the bullet drops

1 Like

This helped so much. Thanks! (30 characters)

Thank you for this guide, anyway thanks again for teaching me🙂