local part = workspace.Smasher
local lastVelocity = Vector3.zero
part.Anchored = false
part.CanCollide = true
local objectDirection = part.CFrame.LookVector
part:ApplyImpulse(objectDirection * 250 * part:GetMass())
part:GetPropertyChangedSignal("AssemblyLinearVelocity"):Connect(function()
lastVelocity = part.AssemblyLinearVelocity
end)
part.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
local speed = lastVelocity.Magnitude
print("Speed is", speed)
print("Velocity is", lastVelocity)
hum:TakeDamage(speed)
end
end)