I’m attempting to make my script to print out all of the children in the character’s model, but it just prints out HumanoidRootPart - what’s the concurrent issue here?
Edit: I’ve updated the script that it seems to be broken on:
local rep = game.ReplicatedStorage
local characters = rep.Characters
local character = {characters.Darisel, characters.Jo, characters.Kennedy, characters.Rabish}
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
for _, i in pairs(char:GetChildren()) do
if i:IsA("Accessory") then
i:Destroy()
end
local randomCharacter = character[math.random(1, #character)]
local cloneAccessories = randomCharacter.Accessories:Clone()
cloneAccessories.Parent = char
for _, c in pairs(cloneAccessories:GetChildren()) do
c.Anchored = false
end
if i:IsA("Shirt") then
i.ShirtTemplate = randomCharacter.Shirt.ShirtTemplate
else
local shirt = Instance.new("Shirt", char)
i.ShirtTemplate = randomCharacter.Shirt.ShirtTemplate
end
if i:IsA("Pants") then
i.PantsTemplate = randomCharacter.Pants.PantsTemplate
else
local pants = Instance.new("Pants", char)
i.PantsTemplate = randomCharacter.Pants.PantsTemplate
end
end
end)
end)