I tried to make a function so that my gui updates when the players backpack has stuff added or removed from it, but I don't know why it's not working
player.Backpack.Changed:connect(function()
print("You have gained an item")
end)
I tried to make a function so that my gui updates when the players backpack has stuff added or removed from it, but I don't know why it's not working
player.Backpack.Changed:connect(function()
print("You have gained an item")
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Because the Player's backpack doesn't actually change unless a property is changed. Say you renamed it or changed the Achievable property, then the event would fire. What you are actually looking for is ChildAdded.
Ok, thx
If you want it to fire when something is added, you should be using ChildAdded or DescendantAdded.