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 » Game Design
Home Search
 

Re: Script won't work?

Previous Thread :: Next Thread 
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
31 Jan 2015 11:30 AM
stats = script.Parent.Parent.Parent.Parent.Parent:findFirstChild("leaderstats")
gold = stats:findFirstChild("Gold")
bp = script.Parent.Parent.Parent.Parent.Backpack
sg = script.Parent.Parent.Parent.Parent.StarterGear
tool = game.Lighting.BowAndArrow
function onClicked(GUI)
if gold.Value >= 100 then
gold.Value = gold.Value - 100
tool:clone().Parent = bp
tool:clone().Parent = sg
if gold.Value < 100 then
script.Parent.Parent.money.Visible = true
wait(1.5)
script.Parent.Parent.money.Visible = false
end
end
end
script.Parent.MouseButton1Click:connect(onClicked)

the point of the script is to give a player a tool IF they have 100 or more gold, and if not they get a textlabel saying "You need more gold." This doesn't seem to be working for some reason...
Report Abuse
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
31 Jan 2015 11:31 AM
output?
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
31 Jan 2015 11:35 AM
No output...
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
31 Jan 2015 11:37 AM
People who are reading this and can build/script/design GUIs: Join my dev team, it's in my groups on my profile, it's called DDG Studios. Pl0x join it!
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
31 Jan 2015 11:44 AM
DDC Studios*
Report Abuse
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
31 Jan 2015 11:58 AM
Bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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