#What am I doing wrong 😭
1 messages · Page 1 of 1 (latest)
I take the object in my hands and put it back in my backpack, how does it work?
tool in starter pack
like you want to see when your player unequips the tool?
yes
for _, v in plr.Backpack:GetChildren() do
v.Unequipped:Connect(function()
print("tool unequipped")
end)
end
and you can do a backpack.childadded if you want it to register tools that get added later on
is there any way to wait for the player to load?
no not necessarily
what do you mean by wait for the player to load
what do you mean by loading
if you wait 5 seconds and connect ChildAdded, it will start working, but if you connect it immediately, nothing will happen
** You are now Level 1! **
connect child added for the backpack?
can you show the code that supposedly doesn't work with connecting it immediately
alright
Player:WaitForChild("Backpack")?
I tried it
Didn't work?
no response
Uh
Can you show us what happens when you press play?
Like loading into the game
Nvm
Saw it
uhh okay
Uh
Did it print when you added the wait?
Like child added
Oop
Saw it
Yeah it didnt print
Anything
It didnt print 1
It's because starter pack won't signal it
I've already pulled it out of the starterpack and moved it to workspace.
sending new video
Okay
** You are now Level 2! **
@river robin Any ideas?
I ran into this problem when I was doing the inventory limit, but the item counter wasn't updated in any way, so I created a test location and am trying to figure out what I am doing wrong.
Maybe try waiting for character added?
player.CharacterAdded:Connect(function(character)
local backpack = player:WaitForChild("Backpack")
backpack.ChildAdded:Connect(function(item)
print(player.Name .. " received item: " .. item.Name)
end)
end)
end)```
Yeah there's something about backpacks being tied to player characters
@static turtle try this out
https://create.roblox.com/docs/reference/engine/classes/Backpack even in the official they tie it around characters