of     1   

Zytu
#64213707Monday, March 12, 2012 3:57 PM GMT

This is a script for my gun shop GUI, that tells the GUI to give the player the gun as well as it will be stored in the backpack when bought. Here is the script. It is the same for all other guns: Player=script.Parent.Parent.Parent.Parent.Parent script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value) script.Parent.MouseButton1Click:connect(function() if Player:findFirstChild("leaderstats") then if Player.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then Player.leaderstats[script.Parent.Currency.Value].Value=Player.leaderstats[script.Parent.Currency.Value].Value-tonumber(script.Parent.Cost.Value) game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.Backpack game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.StarterGear end end end) I haven't used output but is there anything wrong with this script? Thanks if you help!
Zytu
#64214148Monday, March 12, 2012 4:13 PM GMT

Bump 16,314 R$ and 1,039 Tix! :D ~♣$ûρ£®βâ§κξτBαll33♠~
unholysoda
#64214354Monday, March 12, 2012 4:20 PM GMT

Well then, why dont you give us the output?
Zytu
#64214726Monday, March 12, 2012 4:31 PM GMT

I got a lot of outputs (lol) but I think this is the one for the GUI: MouseButton1Click is not a valid member of Workspace 16,314 R$ and 1,039 Tix! :D ~♣$ûρ£®βâ§κξτBαll33♠~
unholysoda
#64214895Monday, March 12, 2012 4:37 PM GMT

Where is this script located?
Zytu
#64215078Monday, March 12, 2012 4:45 PM GMT

StarterGui ​> Shop Gui ​> Main ​> 7 - L96A1 ​> Shop (Script showed on the thread) 16,314 R$ and 1,039 Tix! :D ~♣$ûρ£®βâ§κξτBαll33♠~
unholysoda
#64215153Monday, March 12, 2012 4:49 PM GMT

What exactly is 7 - L96A1? Is it a gui or a a model?
Zytu
#64215165Monday, March 12, 2012 4:49 PM GMT

It's part of the GUI. 16,314 R$ and 1,039 Tix! :D ~♣$ûρ£®βâ§κξτBαll33♠~
su8
#64215215Monday, March 12, 2012 4:51 PM GMT

That can't be the real parent since you're getting this error; MouseButton1Click is not a valid member of Workspace With this; script.Parent.MouseButton1Click:connect(function()
nate890
#64215294Monday, March 12, 2012 4:54 PM GMT

    local cost=25     local currency="gold"     local item=game.Lighting.Items.Item     local owned=false          local player=game.Players.LocalPlayer          script.Parent.MouseButton1Down:connect(function()         if not owned and player.leaderstats[currency].Value>=cost then             player.leaderstats[currency].Value=player.leaderstats[currency].Value-cost             item:Clone().Parent=player.Backpack             owned=true         end     end) ~45,904R$ 1,580T$ *nate890*
Zytu
#64215322Monday, March 12, 2012 4:55 PM GMT

@nate Thanks! I'll try it out.

    of     1