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 » Scripting Helpers
Home Search
 

Re: Really weird glitch

Previous Thread :: Next Thread 
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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 is not online. fudsim
Joined: 24 Aug 2011
Total Posts: 228
03 Sep 2013 01:16 PM
Try looking through roblox wiki for help.
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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 is not online. 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
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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