I made a shop that works. It takes your money and gives you an item, but the item doesn't work. (the item works when I use it without buying in shop)
This is the code: (i got it from a youtube tutorial) Zims is my money
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function(click) if player.leaderstats.Zims.Value >= 10 then player.leaderstats.Zims.Value = player.leaderstats.Zims.Value - 10 game.ReplicatedStorage.Tools.Sword:Clone().Parent = player:WaitForChild("Backpack") end end)
Thanks for helping!
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() if player.leaderstats.Zims.Value >= 10 then player.leaderstats.Zims.Value = player.leaderstats.Zims.Value - 10 game.ServerStorage.Tools.Sword:Clone().Parent = Players.LocalPlayer.Backpack end end)
try it