I want to make a shop script and it say cash is not a valid member of Folder i put the codes
game.Players.PlayerAdded:Connect(function(player) local leaderstats= Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player
local cash= Instance.new("NumberValue")
cash.Name="Money"
cash.Value = 1000000
cash.Parent=leaderstats
end)
its called serverstats and the another
game.ReplicatedStorage.Toolevents.Akevent.OnServerEvent:Connect(function(player) if player.leaderstats.cash.Value >= 5000 then player.leaderstats.cash.Value = player.leaderstats.cash.Vaule - 5000 game.ServerStorage.Tools.Ak.Clone().Parent = player.Backpack end end)
and its called Buytools
idk what the problem pls help

2 comments
I can send you the script I have for my leaderboard but I dont know one for buying tools (The leaderboard autosaves too)
Please put your code in code blocks