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: Help.

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
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 is not online. 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 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
07 May 2014 09:45 PM
img.Position.y, img.Size.y, etc
-=Robo=-
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
07 May 2014 09:46 PM
uhh.. Could you put that into the script? I'm awful at coding..
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
07 May 2014 09:51 PM
pweez help me D:
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
08 May 2014 08:26 AM
Bump.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
08 May 2014 08:48 AM
Anyone? Please?
Report Abuse
robocu3 is not online. 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
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
08 May 2014 08:29 PM
umm.. that's what is intended...?
Report Abuse
robocu3 is not online. 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
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
08 May 2014 09:18 PM
Just tested. Now it's YOUR line that has an error.
Report Abuse
robocu3 is not online. 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
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
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
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