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
 

Breaking a loop after a certain amount of time

Previous Thread :: Next Thread 
corto713 is not online. corto713
Joined: 12 Dec 2009
Total Posts: 962
05 Sep 2012 10:57 PM
I would of thought that this would of worked but it moved once

p = Instance.new("Part")
p.Parent = Workspace
p.Anchored = true
while true do
p.Position =
p.Position + Vector3.new(1, 1, 1)
wait(.25)
break
end


Or something along those lines...
Report Abuse
crusada91 is not online. crusada91
Joined: 04 Sep 2010
Total Posts: 684
05 Sep 2012 11:00 PM
a loop isn't that ^^

break is for the for loop

for i = 1, 10 do
if i == 5 then
break
end
end

^^EXAMPLE
Report Abuse
corto713 is not online. corto713
Joined: 12 Dec 2009
Total Posts: 962
05 Sep 2012 11:03 PM
Wow I'm stupid! I forgot about the for loop!
Report Abuse
crusada91 is not online. crusada91
Joined: 04 Sep 2010
Total Posts: 684
05 Sep 2012 11:29 PM
your not stupid..
Report Abuse
corto713 is not online. corto713
Joined: 12 Dec 2009
Total Posts: 962
05 Sep 2012 11:32 PM
But I always have good memory it's just I forgot about that which is what I was trying to re-figure out...
Report Abuse
pugzy is not online. pugzy
Joined: 16 Aug 2007
Total Posts: 11957
06 Sep 2012 12:43 AM
TimeToBreak = NumberinSeconds
StartTime = tick()
while true do
wait()
NewTime = tick()
if((NewTime - StartTime) == TimeToBreak) do
break
end
end
Report Abuse
pugzy is not online. pugzy
Joined: 16 Aug 2007
Total Posts: 11957
06 Sep 2012 12:45 AM
if((NewTime - StartTime) == TimeToBreak) then *
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