lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
|
| 26 Jul 2015 07:07 PM |
There is 2 variables.. Mag and Saved
function SafeDecide(Torso,Part) if Part.BrickColor == color1.Value or Part.BrickColor == color2.Value then Mag = (Part.Position - P.Torso.Position).Magnitude elseif not Part.BrickColor == color.Value then Mag = (Part.Position - P.Torso.Position).Magnitude end if Mag < Saved then Saved = Mag Save = Part.Position end end
If Mag is less then Saved then save "Saved" as Mag. But for some reason it only records if Mag is higher then Saved. :/
I'm I just completely blind right now because to me it should work correctly. |
|
|
| Report Abuse |
|
|
| 26 Jul 2015 07:08 PM |
| And you're sure this is only supposed to run once? |
|
|
| Report Abuse |
|
lomo0987
|
  |
| Joined: 31 May 2008 |
| Total Posts: 2461 |
|
|
| 26 Jul 2015 07:10 PM |
| It's within a loop. But that doesn't matter. :/ |
|
|
| Report Abuse |
|