i want to make shop but this error messes up everything. Help PLS!!!!
script.Parent.MouseButton1Click:connect(function() local RS = game:GetService("ReplicatedStorage") local item = RS:WaitForChild("Stick") local price = 10 -- Change Your Price Here local player = game.Players.LocalPlayer local stats = player:WaitForChild("leaderstats")
if stats.Money.Value >= price then -- Change the Money to your Currency Name stats.Money.Value = stats.Money.Value - price local cloned = item:Clone() local cloned = item:Clone() cloned.Parent = player.Backpack cloned.Parent = player.StarterGear end end)
local stats = player:WaitForChild("leaderstats") it is line with error

1 comment
Next time, present your code in codeblocks.