I’m making a mall in my game, and the mall is the place where players can spend their money. I want to make a script that gives a player their pizza if they have 15 or more Cash, but the parts where the Cash value in leaderstats is changed don’t work.
if game.Players.LocalPlayer.leaderstats.Cash.Value >= 15 then
local y = player.Backpack
local z = game.Lighting["Pizza"]
z:Clone().Parent = y
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value - 15