Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to use GetChildren() on a chracter?

Asked by 7 years ago

I'm not very familiar with the GetChildren() function, but how would I make a code that gets all of the accessories in a character and then sets their transparencies to 1?

1
You could just call RemoveAccessories() on the humanoid. http://wiki.roblox.com/index.php?title=API:Class/Humanoid/RemoveAccessories OldPalHappy 1477 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

I am not familiar with how to remove accessories but here it is on the wiki: http://wiki.roblox.com/index.php?title=API:Class/Humanoid/RemoveAccessories

Also to change the parts to transparency 1 in a model or character model or whatever, just insert this script in a model of your choice:

local sp = script.Parent --The model you insert the script into

function trans()
    for _, child in pairs(sp:GetChildren()) do --Gets the children inside the model
    child.Transparency = 1 --Every Child in the model gets set transparency to 1
end
Ad

Answer this question