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: only works sometimes

Previous Thread :: Next Thread 
GreedTaka is not online. 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 is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 06:10 PM
.
Report Abuse
alij12 is not online. 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 is not online. 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 is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 06:38 PM
.
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 06:49 PM
.
Report Abuse
GreedTaka is not online. 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 is not online. 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 is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 07:07 PM
it doesn't print bro
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 07:32 PM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 07:56 PM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 08:14 PM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 08:42 PM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
25 Dec 2016 09:41 PM
b
Report Abuse
kaddad14 is not online. 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 is not online. 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 is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 06:43 AM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 06:54 AM
b
Report Abuse
GiganticGulian is not online. GiganticGulian
Joined: 18 Feb 2011
Total Posts: 2233
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 is not online. 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 is not online. 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 is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 11:48 AM
bump
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 04:12 PM
.
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 04:49 PM
b
Report Abuse
GreedTaka is not online. GreedTaka
Joined: 12 Dec 2014
Total Posts: 1503
26 Dec 2016 06:18 PM
b
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