How would i go upon detecting the velocity of a moving part or projectile and do damage based on the velocity and ragdoll towards the direction of the projectile
COMMUNITY QUESTION
Damage based on velocity?
1 answer
BasePart.Velocity field indicates the velocity of an object in any of the 3 directions(XYZ)...
BTW, (parts, meshparts, cylinders, etc) are all instances of the BasePart class..
find more here
2 comments
0
Okay i know how to get the velocity, but however how do i get the velocity on the time of impact? because touched doesnt seem to be fast enough.
0
in that case you would have to track the projectile.. kinda like how radars detect a missile and calculate it's trajectory based on it's velocity, and other factors
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
BasePart.Velocity.Magnitude will return the relative speed of the projectile and you can use that to apply damage proportionally. https://developer.roblox.com/en-us/api-reference/property/BasePart/Velocity