You can write your topic however you want, but you need to answer these questions:
- Fix the Error of no getchildern() in character
- Its Giving an Error
3.Didnt Try
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Accessorys = ReplicatedStorage.Assets.Accessorys
local function RemoveClothing(Character)
local Shirt = Character:FindFirstChild("Shirt")
local Pants = Character:FindFirstChild("Pants")
local TShirt = Character:FindFirstChild("Shirt Graphics")
if Shirt then Shirt:Destroy() end
if Pants then Pants:Destroy() end
if TShirt then TShirt:Destroy() end
for _,BodyPart in pairs(Character:GetChildern()) do
if BodyPart:IsA("BasePart") then
BodyPart.Material = Enum.Material.Leather
end
end
end
local function RemoveAccessorys(Character)
for _, Acessory in ipairs(Character:GetChildren()) do
if Acessory:IsA("Accessory") and Acessory.AccessoryType ~= Enum.AccessoryType.Hair then
Acessory:Destroy()
print(Acessory)
end
end
end
local function AddInGameAccessorys(Character)
local humanoid = Character:FindFirstChildOfClass("Humanoid")
if not humanoid then
error("Character has no humanoid.")
end
local descriptionClone = humanoid:GetAppliedDescription()
descriptionClone.Head = 0
descriptionClone.LeftArm = 0
descriptionClone.RightArm = 0
descriptionClone.LeftLeg = 0
descriptionClone.RightLeg = 0
descriptionClone.Torso = 0
humanoid:ApplyDescription(descriptionClone)
local HelmetClone = Accessorys.Helmet:Clone()
HelmetClone.Parent = Character
RemoveClothing(Character)
end
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAppearanceLoaded:Connect(function(Character)
RemoveAccessorys(Character)
AddInGameAccessorys(Character)
end)
end)