I am making a script, when you pick up an item, a script inside the item will add 1 to a value in the players backpack, but if the value is more than 2 (2 inventory items) it will not let you pick it up. My question is how could I or is it possible to not let the player pick up items? THIS IS NOT A REQUEST, JUST A QUESTION, NOR AM I ASKING YOU FOR A SCRIPT! here is what I have so far (as you can see i have no idea how you could decline picking up items!)
while true do
wait(5)
local item = script.Parent.Parent:GetChildren()
if item.ClassName == "Tool" then
script.Parent.Value = script.Parent.Value + 1
end
print(item)
end
Please help!!! Again, this is not a request, just a question! Thank you!!!

1 comment
K, trying that