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: GUI

Previous Thread :: Next Thread 
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
12 Jul 2011 03:20 PM

script.Parent.MouseButton1Click:connect(function()
bought = script.Parent.Bought.Value
print 'Clicked'
Weapon = script.Parent.Weapon
if bought == "no" and Weapon then
wait()
credits = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Credits.Value
if credits >= 100 then -- Put Price There
credits = credits - 100 -- Put the Number above here too
Weapon:Clone().Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack
Weapon:Clone().Parent = script.Parent.Parent.Parent.Parent.Parent.StarterGear
bought = "yes"
end
end
end
end)

Ok, it works. But it doesn't subtract the credits. It just skips over that part....
Report Abuse
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
12 Jul 2011 03:35 PM
Bump.
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
12 Jul 2011 03:36 PM
script.Parent.MouseButton1Click:connect(function()
bought = script.Parent.Bought.Value
print 'Clicked'
Weapon = script.Parent.Weapon
if bought == "no" and Weapon then
wait()
credits = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Credits
if credits.Value >= 100 then -- Put Price There
credits.Value = credits.Value - 100 -- Put the Number above here too
Weapon:Clone().Parent = script.Parent.Parent.Parent.Parent.Parent.Backpack
Weapon:Clone().Parent = script.Parent.Parent.Parent.Parent.Parent.StarterGear
bought = "yes"
end
end
end
end)
Report Abuse
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
12 Jul 2011 03:38 PM
Nope.
Still doesn't subtract. D:
Report Abuse
zeke505 is not online. zeke505
Joined: 26 May 2008
Total Posts: 15765
12 Jul 2011 03:39 PM
Try it again, because it should work. I tested it and it worked.
Report Abuse
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
12 Jul 2011 03:44 PM
Nope. Didn't subtract the credits. Just gives you tool. :/
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