So im making this game where you can grab and throw things, so i wanted to try and make it so falling parts dealt damage depending on their size, velocity, and density.
You could make a on touched function, and if its hits a player, take damage depending on its velocity, something like this, Humanoid:TakeDamage(FallingPart.Velocity.Magnitude*2)
or something like that. for the Density part you could Humanoid:TakeDamage(FallingPart.Density*2)
and for the size, I’m not sure how you would go about that, if any of this is wrong, please correct me I’m a pretty bad scripter.
For size, it would be Humanoid:TakeDamage(FallingPart.Size.X * FallingPart.Size.Y * FallingPart.Size.Z)
unless I failed grade 5 math class