Cant tell when a child is added in the backpack of the player?

Ok so here is the code:

module.setupPlayer = function(player:Player)
	baseFunctions.loadPlayerCharacter(player,workspace:WaitForChild('World').Spawns.Other.SpawnLocation)
	
	setupEvent:FireClient(player)
	
	
	warn('HERE WE GO ZZ')
	
	-- handle new items

	player.Backpack.ChildAdded:Connect(function(child)
		warn(child)
		if child:IsA('Tool') then
			if not lootDrops.NotContraband[child.Name] and player.Team == teams.Prisoners then -- has contraband, make them damagable
				print('PLAYER HAS CONTRABAND')
			else
				print('Is not contraband')
			end
		end
	end)
end

Ok so in theory this should work right, IT DOESNT.
The warn before the stuff runs, so I know it should be happening, except when a child is added, still nothing.
I dont know why this happens so if anyone knows thatd be nice

Not enough info from code but I can guess whats happening.

  1. Tool is added on client and script is server script so it wont detect the change due to replication. Check by switching server and client.
  2. Tool is already inside the backpack so its already added, check using :GetChildren.
  3. Tool is in players character as it equips so its not in backpack? Probably not more likely 1 or 2.

Nope its on the server, and yes I did check, I made it print which its on lol.

nope, it isnt there yet, I checked.

Sadly this also doesnt work. Ill try figuring it out ig

Nvm just found another post by searching up back pack child and child added together.

Its probably due to this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.