menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
if new Child?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
if new Child?
CardsOfFate
Join Date: 2014-07-08
Post Count: 761
#182839490
Monday, February 01, 2016 6:58 PM GMT
Is it possible to run something everytime a part is added to a model?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
[rfa#hidefromsearch]
Join Date: 0001-01-01
Post Count: 0
#182839550
Monday, February 01, 2016 6:59 PM GMT
[rfa#hidefromsearch]
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
3DReality
Join Date: 2015-03-08
Post Count: 150
#182839565
Monday, February 01, 2016 7:00 PM GMT
script.Parent.ChildAdded:connect(function(child) --code end) This :?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
CardsOfFate
Join Date: 2014-07-08
Post Count: 761
#182840822
Monday, February 01, 2016 7:42 PM GMT
script.Parent.ChildAdded:connect(function(child) end) I take it 'child' is the last child that was added to the Model?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
128Gigabytes
Join Date: 2014-04-17
Post Count: 3616
#182842526
Monday, February 01, 2016 8:25 PM GMT
http://wiki.roblox.com/index.php?title=API:Class/Instance/ChildAdded
You might also be interested in
http://wiki.roblox.com/index.php?title=API:Class/Instance/ChildRemoved
http://wiki.roblox.com/index.php?title=API:Class/Instance/DescendantAdded
http://wiki.roblox.com/index.php?title=API:Class/Instance/DescendantRemoving
http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerAdded
http://wiki.roblox.com/index.php?title=API:Class/Players/PlayerRemoving
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
CardsOfFate
Join Date: 2014-07-08
Post Count: 761
#182870765
Tuesday, February 02, 2016 4:09 AM GMT
Whats the difference between ChildAdded and DescendantAdded?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
lapladav
Join Date: 2010-08-27
Post Count: 127
#182870841
Tuesday, February 02, 2016 4:11 AM GMT
I think Child is a direct Child to the Parent targeted while Descendent added will run also if a child is added to the child from the parent targeted.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
SippinBubbly
Join Date: 2012-11-02
Post Count: 444
#182870912
Tuesday, February 02, 2016 4:12 AM GMT
Model -Child --Descendant I think child is also a descendant
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right