local price = 9 -- The price of your item. local db = true script.Parent.ClickDetector.MouseClick:connect(function(player) if player.leaderstats.Cash.Value >= price then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - price db = false script.Parent.BrickColor = BrickColor.new("Bright red") game.ReplicatedStorage.WoodPickaxe:Clone().Parent = player.StarterGear and player.BackPack wait(0.5) script.Parent.BrickColor = BrickColor.new("Bright green") db = true end end)
how do i fix it i tried with game.ReplicatedStorage.WoodPickaxe:Clone().Parent = player.StarterGear and player.BackPack
but then the script doesnt work so i need to choose if i cant find a solution player startergear then i get the tool but first when i die player backpack then i get the tool instant but lose it when i die
This is not how the ‘and’ operator works. Simply use two lines to parent it to both.
local pickaxe = game.ReplicatedStorage.WoodPickaxe pickaxe:Clone().Parent = player.StarterGear pickaxe:Clone().Parent = player.Backpack
Also, the ‘p’ in Backpack is not supposed to be capital.
Make sure the tool has archivable true, if it isn't make it true because if it is false then it'll return nil instead of a cloned instance of the tool.