Hello everyone!
I’m currently trying to ignore Y magnitude in an if statement, can you help me?
Thanks!
if player.Character.HumanoidRootPart.Velocity.Magnitude >= 16 then
print("Something")
end
Hello everyone!
I’m currently trying to ignore Y magnitude in an if statement, can you help me?
Thanks!
if player.Character.HumanoidRootPart.Velocity.Magnitude >= 16 then
print("Something")
end
if (player.Character.HumanoidRootPart.Velocity * Vector3.new(1, 0, 1)).magnitude >= 16 then
-- stuff
end
By multiplying it by Vec3(1, 0, 1) you are giving it a Y value of 0, so the magnitude is just calculated as
x^2 + 0^2 + z^2 = magnitude