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: Help with a simple script...

Previous Thread :: Next Thread 
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
15 Nov 2014 02:59 PM
The players clicks on the gui button and his backpacklimit changes, that's all I need.
Output doesn't say anything, it doesn't even print anything so there's something wrong with the function but I can't figure it out????

plr = script.Parent
repeat plr = plr.Parent until plr:IsA('Player')
sold = false

cost = 300 -- Cost

script.Parent.MouseButton1Down:connect(function()
if plr.BackpackLimit.Value == 10 then -- Backpack before this one
if plr.leaderstats.Coins.Value >= cost then
if sold == false then
sold = true
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value - cost
plr.BackpackLimit.Value = 20
script.Parent.Parent.Number1.Text = "Sold"
script.Parent.Parent.Number1.TextColor3 = Color3.new(77,156,25)
else
print("nope sold")
end
else
--not enough
print("nope coins")
end
else
print("nope backpack")
end
end)
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
16 Nov 2014 02:40 AM
Anyone?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
16 Nov 2014 02:41 AM
Try using a localscript instead


The potato speaks the truth
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
16 Nov 2014 03:18 AM
is this in the PLAYER?
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
16 Nov 2014 03:28 AM
Yes, in the playerGui...
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
16 Nov 2014 03:32 AM
Local Script doesn't work.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
16 Nov 2014 03:43 AM
Sad face...
Report Abuse
parkiet3 is not online. parkiet3
Joined: 16 Jul 2011
Total Posts: 832
16 Nov 2014 04:37 AM
Try adding some breakpoints, to see where it jumps out
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