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
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
| |
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
| |
|
|
| 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
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
| |
|
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 |
|
|
|
| 04 Dec 2014 03:48 PM |
The answer is in the output.
".Player.PlayerGui" |
|
|
| Report Abuse |
|
|
|
| 04 Dec 2014 03:49 PM |
Don't use game.PlayerGui, use Player.PlayerGui. Define Player first.
|
|
|
| Report Abuse |
|
|
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 |
|
|