Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

my child added isn't firing?

My child added isn't firing

game.Players.PlayerAdded:Connect(function(plr)
	
	plr.Backpack.ChildAdded:Connect(function()
print('Chipld was added')
end)


end)

No errors too

4 comments

0

I'm confused what is the purpose of this script, If its a script that detects when a player enters the game just have line 1, no need for line 3.

0

PlayerAdded events don't work quite right in roblox studio. I suggest publishing this as a private game and see if it works then.

0

do you want this to fire for objects added in game or via the starterpack?

0

I want it to fire for you know the players backpack in the player?

1 answer

local Players = game:GetService("Players");

local function playerAdded(player)
	local Backpack = player:WaitForChild("Backpack");

	local function backpackChildAdded(child)
		print(Child.Name.." added to backpack.");
	end;

	backpack.ChildAdded:Connect(backpackChildAdded);
end;

Players.PlayerAdded:Connect(playerAdded);

2 comments

0

The script dose not work

1

Why are there semicolons... its not java

This discussion is preserved as it was. New answers, comments, and votes are closed.