game.ReplicatedStorage:WaitForChild("PickupItem").OnServerEvent:Connect(function(player, item, itemMins)
local itemname = item.Parent.Name
if player:WaitForChild("Data").Minutes.Value >= itemMins and not player.Backpack:FindFirstChild(itemname) and not player.Character:FindFirstChild(itemname) then
local newItem = item.Parent:Clone()
newItem.Parent = player.Backpack
newItem.Handle.Anchored = false
else
player.PlayerGui.ScreenGui.Error.Visible = true
wait(0.5)
player.PlayerGui.ScreenGui.Error.Visible = false
print(itemMins)
print(item.Name)
end
end)
Your using item.Parent:Clone() so Iâm assuming the script is inside the tool. Everytime you fire this event it creates another tool with the same script inside. The first time you call the function you will get 1 tool and the second time you run it you will get 2 because thereâs two scripts listening for the event. Try putting the script somewhere thatâs not in the tool
Inhale
I donât think thatâd matter anyways, finding the Tool on both the Playerâs Character/Playerâs Backpack or the StarterGear would still have the same result regardless