BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 21 Mar 2014 04:53 PM |
image = script.Parent texture = script.Parent.Image Image1 = "http://www.roblox.com/asset/?id=136485712" Image2 = "http://www.roblox.com/asset/?id=24166543" Image3 = "http://www.roblox.com/asset/?id=63760686" Image4 = "http://www.roblox.com/asset/?id=53382802" while true do if texture = Image1 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position+Udim2.new(0, 1, 0, 0) end texture = Image2 if texture = Image2 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position-Udim2.new(0, 1, 0, 0) end texture = Image3 if texture = Image3 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position + Udim2.New(0, 1, 0, 0) end texture = Image4 if texture = Image4 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position - Udim2.new(0, 1, 0, 0) end end end end end end |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 21 Mar 2014 04:54 PM |
Error: line 8: 'then' expected near '='
Thats what the output says, but there is a "Then" near '='
image = script.Parent texture = script.Parent.Image Image1 = "http://www.roblox.com/asset/?id=136485712" Image2 = "http://www.roblox.com/asset/?id=24166543" Image3 = "http://www.roblox.com/asset/?id=63760686" Image4 = "http://www.roblox.com/asset/?id=53382802" while true do if texture = Image1 then -- Line 8, the problem. wait(10) for i = 1, 201 do wait(.01) image.Position = Position+Udim2.new(0, 1, 0, 0) end texture = Image2 if texture = Image2 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position-Udim2.new(0, 1, 0, 0) end texture = Image3 if texture = Image3 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position + Udim2.New(0, 1, 0, 0) end texture = Image4 if texture = Image4 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position - Udim2.new(0, 1, 0, 0) end end end end end end |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 21 Mar 2014 04:56 PM |
| Hint: == is different from = |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 04:59 PM |
Fix I hope:
image = script.Parent texture = script.Parent.Image Image1 = "http://www.roblox.com/asset/?id=136485712" Image2 = "http://www.roblox.com/asset/?id=24166543" Image3 = "http://www.roblox.com/asset/?id=63760686" Image4 = "http://www.roblox.com/asset/?id=53382802" while true do if texture == Image1 then -- Line 8, the problem. wait(10) for i = 1, 201 do wait(.01) image.Position = Position+Udim2.new(0, 1, 0, 0) end texture = Image2 if texture == Image2 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position-Udim2.new(0, 1, 0, 0) end texture = Image3 if texture == Image3 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position + Udim2.New(0, 1, 0, 0) end texture = Image4 if texture == Image4 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position - Udim2.new(0, 1, 0, 0) end end end end end end |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 05:00 PM |
Fixed.
image = script.Parent texture = script.Parent.Image Image1 = "http://www.roblox.com/asset/?id=136485712" Image2 = "http://www.roblox.com/asset/?id=24166543" Image3 = "http://www.roblox.com/asset/?id=63760686" Image4 = "http://www.roblox.com/asset/?id=53382802" while true do if texture == Image1 then -- Remember, you must use == and not = with if statements. wait(10) for i = 1, 201 do wait(.01) image.Position = Position+Udim2.new(0, 1, 0, 0) end texture = Image2 if texture = Image2 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position-Udim2.new(0, 1, 0, 0) end texture = Image3 if texture == Image3 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position + Udim2.New(0, 1, 0, 0) end texture = Image4 if texture = Image4 then wait(10) for i = 1, 201 do wait(.01) image.Position = Position - Udim2.new(0, 1, 0, 0) end end end end end end |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 05:01 PM |
you can define a variable as a property,but changing that variable doesn't change the property take out "texture"
and change it to
if image.Image == Image1 then--etc |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 05:02 PM |
The problem was that you used: if image = image1 1 = is for changing values 2 == is for checking values so... if image == image1 |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 05:02 PM |
And,in a "if" statement if statement == true then--has to be "==" "==" means,is equal to |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 05:04 PM |
Remove the variable"texture" And everywhere it says "texture" in the script Change it to image.Image |
|
|
| Report Abuse |
|
|