So i made a Coffee Shop and did all i could. I made also this script and it always shows me this error... Here is my script :
Coffee = 2
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player:FindFirstChild("leaderstats") then
-- We know that the player has leaderstats
if player.leaderstats.Cash.Value >= Coffee then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - Coffee
script.Parent.Parent.sadle.BrickColor = BrickColor.Random()
local copy = game.ServerStorage.Coffee:Clone()
copy.Parent = game.Players.LocalPlayer.Backpack
end
end
end)
The error says its on line 6. So this one : if player.leaderstats.Cash.Value >= Coffee then .. Help me please

2 comments
Make sure the Cash.Value is a numbervalue and not a stringvalue.
Huh? What do u mean by that?