So uh yeah this is the code
player = script.Parent.Parent.Parent.Parent.Parent.Parent money = player.leaderstats.Cash price = 100 tool = game.Lighting.ShopItems:findFirstChild("M16A4") function buy() if money.Value >= price then money.Value = money.Value - price local a = tool:clone() a.Parent = player.Backpack --local b = tool:clone() [in case I want a tool to save on death] --b.Parent = player.StarterGear end end script.Parent.MouseButton1Down:connect(buy)
And here is the error in the output
03:23:04.352 - leaderstats is not a valid member of PlayerGui 03:23:04.353 - Stack Begin 03:23:04.353 - Script 'Players.MaximusFireFight.PlayerGui.Shop.weaponshop.Desc.M16A4Description.Purchase.Main', Line 4 03:23:04.354 - Stack End
I have no idea what it means by leaderstats not being a valid member of the PlayerGui, any help would be much appreciated, thanks UwU