My goal is to have a player pick up a tool with ProximityPrompt and I don’t want any duplicates of the same tool in the players backpack. (I’m not too good at scripting)
I realized there was a flaw. When I went to pick up the item again, this time with the item in my hand, it picks up another Pepperoni Pizza. I want the player to just have one of that specific item. Two Pizzas
I have tried looking all over for some help but can’t seem to find any.
Here is the script for the prompt, Mesh>ProximityPrompt>Script
script.Parent.Triggered:Connect(function(Player)
if Player.Backpack:FindFirstChild("Pizza") then
return
end
local Pizza = game.ReplicatedStorage.Pizza:Clone()
Pizza.Parent = Player.Backpack
end)
If you have any questions please let me know.