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 gui shop?

Previous Thread :: Next Thread 
georgiegreen is not online. georgiegreen
Joined: 24 Jun 2011
Total Posts: 848
13 Sep 2011 09:12 PM
I have this script. game.Players.Character is not working



function onButtonClicked()
end
local clicker = game.Players.Character
cash = clicker.leaderstats["KOs"]

if cash.Value < 50 then return end

if cash.Value >= 50 then

h = game.Lighting.GodSword:clone()

h.Parent = clicker.Backpack

b = game.Lighting.GodSword:clone()

b.Parent = clicker.StarterGear

cash.Value = cash.Value - 50

end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
13 Sep 2011 09:19 PM
Not even going to read it, I'll just make a new one, since I'm so experienced with Gui shops :o

cost=500
modelname="gun" --put in lighting
player=script.Parent.Parent.Parent.Parent --might need to edit
script.Parent.MouseButton1Down:connext(function()
if player.leaderstats.Money.Value<=cost then
wep=game.Lighting:FindFirstChild(modelname):clone()
wep.Parent=player.Backpack
player.leaderstats.Money.Value=player.leaderstats.Money.Value-cost
end
end)

­<'+1 Post. Ujelly?'>
Report Abuse
wooshhead3556 is not online. wooshhead3556
Joined: 14 Aug 2009
Total Posts: 80
13 Sep 2011 10:29 PM
I think you need another end. Whats output?
Report Abuse
georgiegreen is not online. georgiegreen
Joined: 24 Jun 2011
Total Posts: 848
13 Sep 2011 10:49 PM
Character is not a valid member of Players, or something like that.
Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
13 Sep 2011 11:09 PM
script.Parent.MouseButton1Down:connect(function(Click)
local clicker = game.Players.LocalPlayer
local cash = clicker.leaderstats["KOs"]
if cash.Value >= 50 then
game.Lighting.GodSword:clone().Parent = clicker.Backpack
game.Lighting.GodSword:clone().Parent = clicker.StarterGear
cash.Value = cash.Value - 50
end end)

?
Report Abuse
mcnoobster2011 is not online. mcnoobster2011
Joined: 24 Apr 2011
Total Posts: 66
13 Sep 2011 11:58 PM
take off the end at the top, and throw 2 extra end's at the end.
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