I’m trying to do “if magnitude is between two numbers” in an if then
statement, but it doesn’t work. It will error attempt to compare number and boolean
. Any other ways?
Tried:
if 10 > ((Char.PrimaryPart.Position-ClosestTarget.RootPart.Position).Magnitude) > 20 then
or
if not ((Char.PrimaryPart.Position-ClosestTarget.RootPart.Position).Magnitude) < 10 and not ((Char.PrimaryPart.Position-ClosestTarget.RootPart.Position).Magnitude) > 20 then
or
local AmbushMagnitude = NumberRange.new(10,20)
if ((Char.PrimaryPart.Position-ClosestTarget.RootPart.Position).Magnitude) == AmbushMagnitude then