How do I measure velocity so that when it exceeds a certain velocity, the sword tool does damage? I thought about doing something like
if part.Velocity < Vector3(10,0,0) then --damage script here end
until I found out that velocity doesn't work too well with humanoids.
local Sword = script. Parent local speedLimit = 30 local dmg Sword.Blade.Touched: connect (function (part) if part.Parent:FindFirstChild("Humanoid") then dmg = ((part.Velocity.magnitude > speedLimit ) and (20 + (speedLimit/2) or 20) part.Parent.Humanoid: TakeDamage(dmg) end end)