|
| 03 Sep 2013 01:11 PM |
I have a button which when the Item Value changes, it updates the TextButton's Text to whatever it is. When the Text changes, I click on the button to do what the button does, and it says that the Item Value is [Empty] but the text on the button isn't that. It sounds confusing. Here's the scripts.
What changes the button values function hit() script.Parent.Ore.Transparency = script.Parent.Integrity.Value / 10 script.Parent.Ore2.Transparency = script.Parent.Integrity.Value / 10 script.Parent.Ore3.Transparency = script.Parent.Integrity.Value / 10 if script.Parent.Integrity:FindFirstChild("creator") ~= nil then local hitter = script.Parent.Integrity.creator.Value if script.Parent.Integrity.Value == 10 and canbemined then canbemined = false for i=1,14 do local slot = hitter.PlayerGui.Inv.Frame:findFirstChild("Slot"..i) if slot.Empty.Value == true then if done == false then slot.Empty.Value = false slot.Gear.Value = false slot.Item.Value = item done = true end end end script.Parent.Ore.Transparency = 1 script.Parent.Ore2.Transparency = 1 script.Parent.Ore3.Transparency = 1 wait(10) regen() end end end
The button
function update() script.Parent.Text = script.Parent.Item.Value if script.Parent.Text == "[Empty]" then script.Parent.BackgroundColor3 = Color3.new(112/255,112/255,112/255) empty = true script.Parent.Empty.Value = true else script.Parent.Parent.PickUp:play() script.Parent.BackgroundColor3 = Color3.new(160/255,160/255,160/255) empty = false script.Parent.Empty.Value = false end end
function give() if empty == false then if gear.Value then game.Lighting[item.Value]:clone().Parent = backpack else local cloneditem = game.Lighting[item]:Clone() cloneditem.Parent = workspace cloneditem.Position = workspace[character].Torso.Position + Vector3.new(0,0,2) end empty = true script.Parent.Item.Value = "[Empty]" script.Parent.Empty.Value = true end end |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2013 01:12 PM |
| It works fine if you wait a couple seconds before clicking the button after it changes though. |
|
|
| Report Abuse |
|
|
fudsim
|
  |
| Joined: 24 Aug 2011 |
| Total Posts: 228 |
|
|
| 03 Sep 2013 01:16 PM |
| Try looking through roblox wiki for help. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2013 01:21 PM |
| I go through the wiki whenever I go into Studio, what do you suggest I look for? |
|
|
| Report Abuse |
|
|
fudsim
|
  |
| Joined: 24 Aug 2011 |
| Total Posts: 228 |
|
|
| 03 Sep 2013 01:24 PM |
| Other thing is you can check scripts by which line is wrone or doesnt fit by going on studio and clicking "view output window". ~I hope that helps a bit. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2013 01:30 PM |
| Yeah, I'm aware of output. I've looked and there are no wait() commands which mess with it, I think i'll just ignore it for a bit and wait until the game is ready and then try and work around it later. |
|
|
| Report Abuse |
|
|
fudsim
|
  |
| Joined: 24 Aug 2011 |
| Total Posts: 228 |
|
|
| 03 Sep 2013 01:31 PM |
| Sure, I think you will get the hang of the script soon. |
|
|
| Report Abuse |
|
|