So heres what the script is sapose to do, you buy an they item by clicking on the button, it takes away 10 cash, then changes an textlabels text to true
I tried to test it on play mode, it it takes away money but it dosent change the text label text
I have a diagram of the heirarchy of the items, The textlabel is in the gui called Shop
Please tell me what the problem is c;
Image1 --> http://prntscr.com/9upeja Image2 --> http://prntscr.com/9upezl Image3 --> http://prntscr.com/9ur7w9
Anything that helps is appreciated
Cash = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Cash
function onClick()
local Item = script.Parent.Parent.Parent.Parent.Inventory.Background3.Frame.Item.HasBought
if Cash.Value >= 10 then
Cash.Value = Cash.Value - 10
wait(.2)
script.Parent.Parent.Parent.Parent.Inventory.Background3.Frame.Item.HasBought.Text = "True"
end
end
script.Parent.MouseButton1Click:connect(onClick)

1 comment
I could easily help you with that.... If I wasn't using an iPad because your 'hierarchy' isn't accessible on iPad but, I am quiet good at GUIs and I guess now I have to wait till I get home to look at what your 'hierarchy' is....