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 » Scripters
Home Search
 

Re: Help [ GUI]

Previous Thread :: Next Thread 
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:42 PM
function click()
local box = game.StarterGui.ScreenGui.TextBox.Text
local label = script.Parent
label.Image = "http://www.roblox.com/asset/?id="..box
end

script.Parent.Parent.TextButton.MouseButton1Click:connect(click)
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:43 PM
b
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:45 PM
zz
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
04 Dec 2014 03:45 PM
Attempt to concatenate "box", a userdata value.

Check the output next time please.

Also, I think you need PlayerGui, not StarterGui.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:45 PM
oh yeah, playergui
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:47 PM
output

PlayerGui is not a valid member of DataModel
Script 'Players.Player.PlayerGui.ScreenGui.ImageLabel.Script', Line 2 Disconnected event because of exception
Report Abuse
championbuilder is online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
04 Dec 2014 03:48 PM
The answer is in the output.

".Player.PlayerGui"
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
04 Dec 2014 03:49 PM
Don't use game.PlayerGui, use Player.PlayerGui.
Define Player first.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
04 Dec 2014 03:52 PM
function click(p)
local player = p.Name
local c = game.Players.player.PlayerGui.ScreenGui.TextBox.Text
local label = script.Parent
label.Image = "http://www.roblox.com/asset/?id="..c
end

script.Parent.Parent.TextButton.MouseButton1Click:connect(click)


output:
Players.Player.PlayerGui.ScreenGui.ImageLabel.Script:2: attempt to index local 'p' (a nil value)
Stack Begin
Script 'Players.Player.PlayerGui.ScreenGui.ImageLabel.Script', Line 2
Disconnected event because of exception
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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