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: WHY DOES THIS NOT LOOP?

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:12 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end
while i < 10 do
repeat
rotate()
wait(.8)
rotate2()
wait(.8)
until 1==2
end

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
30 Jul 2014 01:14 AM
Lemme guess, it works for one cycle?
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:15 AM
Ya.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:16 AM
So what do I do?

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
HugelyFriendlyGuest is not online. HugelyFriendlyGuest
Joined: 12 Jul 2014
Total Posts: 42
30 Jul 2014 01:17 AM
u y need while loop yall. u put a repeat inside a while loop. wont work
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
30 Jul 2014 01:18 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function rot_ini()
rotate()
wait(.8)
rotate2()
wait(.8)
until i==2
end
end

while wait() do rot_ini() end --Infinite loop
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:19 AM
end expected to close function at line 10.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
30 Jul 2014 01:21 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function rot_ini()
repeat
rotate()
wait(.8)
rotate2()
wait(.8)
until i==2
end

while wait() do rot_ini() end --Infinite loop
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:23 AM
Now it only does rotate().

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:24 AM
Okay, now it does
rotate()
rotate2()
rotate()

long pause here

rotate2()

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:28 AM
Now it's just spastic.

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:30 AM
bump

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
30 Jul 2014 01:33 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function rot_ini()
rotate()
wait(.8)
rotate2()
wait(.8)
until i==2
end
end

while wait() do rot_ini() wait(1.6) end --?
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
30 Jul 2014 01:45 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function rot_ini()
repeat
rotate()
wait(.8)
rotate2()
wait(.8)
until i==2
end

while wait() do rot_ini() end --Infinite loop
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:48 AM
does rotate() then stops

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
micke3212 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
30 Jul 2014 01:54 AM
It states 1 not i at line "until i == 2"

Also, you forgot to add the one to the i to make it two...
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:58 AM
??????????????????

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 01:59 AM
We're talking about this script now:

local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function rot_ini()
repeat
rotate()
wait(.8)
rotate2()
wait(.8)
until i==2
end

while wait() do rot_ini() end --Infinite loop

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 02:13 AM
bump

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
micke3212 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
30 Jul 2014 02:15 AM
... This is simple...

local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function sys()
rotate()
wait(.8)
rotate2()
wait(.8)
end

while wait() do
if i < 2 then
sys
i = i+1
end
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 02:40 AM
didn't work. "'=' expected near i"

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 02:45 AM
bump

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
micke3212 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
30 Jul 2014 02:47 AM
local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function sys()
rotate()
wait(.8)
rotate2()
wait(.8)
end

while wait() do
if i < 2 then
sys
i = i+1
end
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
30 Jul 2014 02:49 AM
didn't work. "'=' expected near i"

Caaaactus. Prov 3:5: Trust in the LORD with all your heart and lean not on your own understanding.
Report Abuse
micke3212 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
30 Jul 2014 02:51 AM
Oh I notice the problem here I believe this should work: local i = 1
local ev = script.Parent
function rotate()
ev:TweenSizeAndPosition(UDim2.new(0,0,0,300), UDim2.new(.5,0,0,0),"Out","Linear",1)
end
function rotate2()
ev:TweenSizeAndPosition(UDim2.new(0,300,0,300), UDim2.new(0,0,0,0),"Out","Linear",1)
end

function sys()
rotate()
wait(.8)
rotate2()
wait(.8)
end

while wait() do
if i < 2 then
sys()
i=i+1
end
end
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