This is a script I made that if the part touches something and its X velocity is higher than 20 it prints "touched" but I realized that the numbers would go into the negatives. How would I find the speed of the part without it going into the negatives?
local vel = script.Parent.Parent.Parent.Parent.Part.Velocity.X
local minvel = 20
script.Parent.Touched:Connect(function()
if not debounce then
if vel > minvel then
debounce = true
print("touched")
wait(0.5)
debounce = false
end
end
end)

1 comment
This is wrong as the vel variable wont change as you indexed it from the get to.