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: What's wrong with this line?

Previous Thread :: Next Thread 
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 12:53 AM
script.Parent.Image = (script.Parent.Parent.(script.Parent.Parent.Select.Value).Image)

how would I get that to work?
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
14 Aug 2011 12:55 AM
You can't do that, try this.
---------
local Value = script.Parent.Parent.Select.Value
script.Parent.Image = (script.Parent.Parent[Value].Image)
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 01:15 AM
Not working. heres the whole script

w = script.Parent.Parent.Select

function click(mouse)
if script.Parent.Parent.Select.Value ~= nil then
script.Parent.Image = (script.Parent.Parent[w].Image)
script.Parent.Parent[w].Image = script.Parent.Image
script.Parent.Parent.Select.Value = nil
elseif script.Parent.Parent.Select.Value == nil then
script.Parent.Parent.Select.Value = script.Parent.Name
end
end
script.Parent.MouseButton1Click:connect(click)
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 01:16 AM
Says an error on line 5 too.
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 01:26 AM
hello?
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 02:41 AM
Please, hello, anyone?
Report Abuse
3465yoba is not online. 3465yoba
Joined: 31 Jul 2011
Total Posts: 377
14 Aug 2011 02:44 AM
function click(mouse)
if script.Parent.Parent.Select.Value ~= nil then
script.Parent.Image = (script.Parent.Parent[w].Image)
script.Parent.Parent[w].Image = script.Parent.Image
script.Parent.Parent.Select.Value = nil
elseif script.Parent.Parent.Select.Value == nil then
script.Parent.Parent.Select.Value = script.Parent.Name
end
end
script.Parent.MouseButton1Click:connect(click)

What's w???
Report Abuse
catlover0624 is not online. catlover0624
Joined: 15 Apr 2010
Total Posts: 250
14 Aug 2011 02:46 AM
w = script.Parent.Parent.Select

function click(mouse)
if script.Parent.Parent.Select.Value ~= nil then
script.Parent.Image = (script.Parent.Parent[w].Image) -- This is line five.
script.Parent.Parent[w].Image = script.Parent.Image
script.Parent.Parent.Select.Value = nil
elseif script.Parent.Parent.Select.Value == nil then
script.Parent.Parent.Select.Value = script.Parent.Name
end
end
script.Parent.MouseButton1Click:connect(click)
Report Abuse
3465yoba is not online. 3465yoba
Joined: 31 Jul 2011
Total Posts: 377
14 Aug 2011 02:47 AM
Oh fail... Sorry.. copy/pated wrong...

Erm... Check your referencing... Make sure the number of parents is correct...
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 02:56 AM
New script:

w = script.Parent.Parent.Select.Value

function click(mouse)
if script.Parent.Parent.Select.Value ~= "" then
script.Parent.Image = (script.Parent.Parent[w].Image)
script.Parent.Parent[w].Image = script.Parent.Image
script.Parent.Parent.Select.Value = ""
elseif script.Parent.Parent.Select.Value == "" then
script.Parent.Parent.Select.Value = script.Parent.Name
end
end
script.Parent.MouseButton1Click:connect(click)


Error:

Sun Aug 14 02:55:32 2011 - is not a valid member of Frame
Sun Aug 14 02:55:32 2011 - Script "Players.Player.PlayerGui.inter_main.backpack.BG.1_1.LocalSc", Line 5
Sun Aug 14 02:55:32 2011 - stack end
Report Abuse
me2kool2talk2u is not online. me2kool2talk2u
Joined: 19 Feb 2007
Total Posts: 2914
14 Aug 2011 12:56 PM
anyone?
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