When clicked, the button gives a tool and prints a message. The problem is the message doesnt go away so when the shop gui is closed, you can not open it again (part on touched open gui). I think it is the "hint" s fault because it also doesnt say anything. if someone could get rid of the hint (make it say something and close), that would be great. (i suck at scripting)
local items = script.Parent.Frame:GetChildren()
for i = 1, #items do
function buy()
Gold = script.Parent.Parent.Parent.Parent.leaderstats:FindFirstChild(items[i].Currency.Value)
h = Instance.new("Hint")
h.Parent = script.Parent.Parent.Parent
if Gold.Value >= items[i].Cost.Value then
Gold.Value = Gold.Value - items[i].Cost.Value
toolca = game.Lighting:FindFirstChild(items[i].ItemName.Value):Clone()
toolcb = game.Lighting:FindFirstChild(items[i].ItemName.Value):Clone()
toolca.Parent = script.Parent.Parent.Parent.Parent.Backpack
toolcb.Parent = script.Parent.Parent.Parent.Parent.StarterGear
end
end
items[i].BuyButton.MouseButton1Click:connect(buy)
end
