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 » Scripting Helpers
Home Search
 

Re: I cannot get this loop to end!

Previous Thread :: Next Thread 
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
24 Apr 2014 02:20 PM
Even when the Size is the same value as num it still will not end the repeat.

repeat
wait()
script.Parent.Parent.Value.Value = val
num = ((6/#Numplayer) * val)
if val == 0 then
num = 1.2
end
print(num)
if script.Parent.Size.Y < num then
script.Parent.Size = Vector3.new(script.Parent.Size.X, script.Parent.Size.Y + inc, script.Parent.Size.Z)
script.Parent.CFrame = CFrame.new(script.Parent.Position.X, ((ypos.Position.Y + (ypos.Size.Y/2)) + (script.Parent.Size.Y/2)), script.Parent.Position.Z)
elseif script.Parent.Size.Y > num then
script.Parent.Size = Vector3.new(script.Parent.Size.X, script.Parent.Size.Y - inc, script.Parent.Size.Z)
script.Parent.CFrame = CFrame.new(script.Parent.Position.X, ((ypos.Position.Y + (ypos.Size.Y/2)) + (script.Parent.Size.Y/2)), script.Parent.Position.Z)
else
print("Fits")
break
end
until script.Parent.Size.Y == num
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
24 Apr 2014 02:30 PM
The size isn't rounding. I'm getting like 6.0101022
End post.
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
24 Apr 2014 02:32 PM
local val = game.Players.NumPlayers -- Not sure if it's NumPlayers or PlayersNum
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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