generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Logic is failing this script?

Previous Thread :: Next Thread 
lomo0987 is not online. 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
TrainingToTroll is not online. TrainingToTroll
Joined: 27 Oct 2012
Total Posts: 1757
26 Jul 2015 07:08 PM
And you're sure this is only supposed to run once?
Report Abuse
lomo0987 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image