|
| 07 May 2014 09:37 PM |
local img = script.Parent
while true do if img.Size.X.Offset > 0 then wait(0.001) img.Image = "rbxassetid://152544024" --Makes it the Normal image. img.Size = UDim2.new(0, y-2, 0, 300) img.Position = UDim2.new(0, y+1, 0, 100) else wait(.001) img.Image = "rbxassetid://156333628" --Makes it the backwards image. img.Size = UDim2.new(0, y+2, 0, 300) img.Position = UDim2.new(0, y-1, 0, 100) end end
OUTPUT
22:37:08.965 - Players.Player1.PlayerGui.ScreenGui.Frame.ImageLabel.Script:7: attempt to perform arithmetic on global 'y' (a nil value) |
|
|
| Report Abuse |
|
|
Aethium
|
  |
| Joined: 29 Mar 2014 |
| Total Posts: 574 |
|
|
| 07 May 2014 09:43 PM |
"y" isnt defined.
- Add 1.5k | Deplexity | its a lego men game stop worrying |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 07 May 2014 09:45 PM |
img.Position.y, img.Size.y, etc -=Robo=- |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 09:46 PM |
| uhh.. Could you put that into the script? I'm awful at coding.. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 May 2014 07:21 PM |
if img.Size.X.Offset > 0 then -- see what you did here, you put Size.X and got the X value in the size. do the same for the rest of the script, look in particular places it errored. -=Robo=- |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 08:29 PM |
| umm.. that's what is intended...? |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 May 2014 09:06 PM |
OKAY, I'LL MANUALLY FIX IT FOR YOU THEN
local img = script.Parent
while true do if img.Size.X.Offset > 0 then -- this won't work wait(0.001) img.Image = "rbxassetid://152544024" --Makes it the Normal image. img.Size = UDim2.new(0, img.Size.Y-2, 0, 300) img.Position = UDim2.new(0, img.Position.Y+1, 0, 100) else wait(.001) img.Image = "rbxassetid://156333628" --Makes it the backwards image. img.Size = UDim2.new(0, img.Size.y+2, 0, 300) img.Position = UDim2.new(0, img.Position.y-1, 0, 100) end end
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 09:18 PM |
| Just tested. Now it's YOUR line that has an error. |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 May 2014 09:47 PM |
lol'd look, you can't just use y without it being defined i didn't fix what was broken with it, it looks like there's more to it, i just fixed one thing, and it might not even be an actual fix, but did you at least get the jist of what I'm saying? -=Robo=- |
|
|
| Report Abuse |
|
|
|
| 09 May 2014 02:21 PM |
This is my new script, but it makes it just fly off the screen.
local img = script.Parent while true do --you have to redefine the variables to update them local y = img.Size.X.Offset local x = img.Position.X.Offset if y > 0 then wait(0.1) img.Image = "rbxassetid://152544024" --Makes it the Normal image. img.Position = UDim2.new( img.Position.X.Scale, math.rad(x+1), img.Position.Y.Scale, img.Position.Y.Offset ) img.Size= UDim2.new( img.Size.X.Scale, math.rad(y+2), img.Size.Y.Scale, img.Size.Y.Offset ) else wait(.1) img.Image = "rbxassetid://156333628" --Makes it the backwards image. img.Position = UDim2.new( img.Position.X.Scale, math.rad(x-1), img.Position.Y.Scale, img.Position.Y.Offset ) img.Size= UDim2.new( img.Size.X.Scale, math.rad(y-2), img.Size.Y.Scale, img.Size.Y.Offset ) end end
|
|
|
| Report Abuse |
|
|