i made a shop where you buy a tool and it puts it in your backpack. i was making a script where if you die, none of your tools dissapear. i tried making a script where if you buy a tool, it goes in your starterpack. but that does not work. any help? script that puts tools in my backpack:
script.Parent.MouseButton1Click:connect(function() local replicated = game:GetService("ReplicatedStorage") local item = replicated:WaitForChild("Trophy") local price = 1 local player = game.Players.LocalPlayer local stats = player:WaitForChild("leaderstats") if stats.Points.Value >= price then stats.Points.Value = stats.Points.Value - price local clone = item:Clone() clone.Parent = player.Backpack end end)