GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 25 Dec 2016 05:52 PM |
theFrame.Parent.MouseButton2Click:connect(function() if game.Players.LocalPlayer.PlayerGui.MainGui:FindFirstChild("IE") then game.Players.LocalPlayer.PlayerGui.MainGui:FindFirstChild("IE"):Destroy() end script.Item.Value = theFrame -- changes object value g = Instance.new("TextButton", game.Players.LocalPlayer.PlayerGui.MainGui) g.Name = ("IE") g.Size= UDim2.new(0.084, 0, 0.047, 0) g.Position = UDim2.new(0,mouse.X,0,mouse.Y) g.Text = ("Drop "..theFrame.Name)
g.MouseButton1Click:connect(function() g:Destroy() local Button = script:WaitForChild("Item").Value -- the object value print(Button.Parent.Name) -- works a few times then stops here Button.Parent.Image = ("")
the value changes every time tho |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 25 Dec 2016 06:12 PM |
Wait, which portion only works sometimes?
Do not give up; the beginning is always the hardest part. |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 25 Dec 2016 06:15 PM |
its supposed to change the object values parent image
it only works half the time tho stops at print |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 25 Dec 2016 06:57 PM |
| if u need an example just join my game pick an item up and right click it in inventory |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 25 Dec 2016 07:05 PM |
If it prints that means it does get to the button part. I cant really help you much.
Do not give up; the beginning is always the hardest part. |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
kaddad14
|
  |
| Joined: 13 Apr 2013 |
| Total Posts: 649 |
|
|
| 25 Dec 2016 09:44 PM |
| g:Destroy() try putting that in the end of the function after a wait(.01) |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 26 Dec 2016 05:47 AM |
doesn't work ....
but if i don't remove the item in the button it works why? |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
|
| 26 Dec 2016 07:15 AM |
use the roblox debugger
http://wiki.roblox.com/index.php?title=Lua_debugger
it allows you to iterate over your code line by line, while displaying the values of your variables |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 26 Dec 2016 07:56 AM |
| 08:55:42.306 - Players.Player1.PlayerGui.inventory_manager:60: attempt to yield across metamethod/C-call boundary |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 26 Dec 2016 07:57 AM |
table.foreach(Button:GetChildren(), function(i,v) v:Remove() end)
|
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|