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