if mouse.hit.p <= script.Parent.Parent.Parent.Character.Torso.Position + Vector3.new(20,20,20) then
So.. How do you plan on comparing these two values..?
Is Vector3.new(-10,80,-4.2) larger than, smaller than, or equal to Vector3.new(15,50,1)?
You can see if it is the same, or not.. but I am not sure that would be how you would tell if it is larger than/smaller than.
It looks like you want to check magnitude..?
if (mouse.Hit.p-script.Parent.Parent.Parent.character.Torso.Position).magnitude <= 20 then
--stuff
end |