So the reason this sometimes doesn’t work is because the actual “CharacterAdded” event doesn’t fire. Now there are ways to fix this but there’s an easier solution
Put this in a script inside of “StarterCharacterScripts”
repeat wait() until script.Parent
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
wait()
local CurrentDescription = Humanoid:GetAppliedDescription()
CurrentDescription.Head = 0
CurrentDescription.Torso = 0
CurrentDescription.LeftArm = 0
CurrentDescription.RightArm = 0
CurrentDescription.LeftLeg = 0
CurrentDescription.RightLeg = 0
print("Done")
Humanoid:ApplyDescription(CurrentDescription)
If you want to keep your original script then do this
local Players = game.Players
local function RemoveMeshes(Character)
local Humanoid = Character:WaitForChild("Humanoid")
wait()
local CurrentDescription = Humanoid:GetAppliedDescription()
CurrentDescription.Head = 0
CurrentDescription.Torso = 0
CurrentDescription.LeftArm = 0
CurrentDescription.RightArm = 0
CurrentDescription.LeftLeg = 0
CurrentDescription.RightLeg = 0
Humanoid:ApplyDescription(CurrentDescription)
end
function PlayerJoined(Player)
RemoveMeshes(player.Character or player.CharacterAdded:Wait())
end
Players.PlayerAdded:Connect(PlayerJoined)
I have no idea why but it doesnt work everytime i reset it still brings me back to the original body parts, And it also prints “Done” as you added in the script
I remade the entire script to this and now it works
game.Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAppearanceLoaded:Connect(function(Chr)
for _,child in pairs(Chr:GetChildren()) do
if child:IsA("CharacterMesh") then
child:Destroy()
end
end
end)
end)
local Meshes = {"Head","Torso","LeftArm","RightArm","LeftLeg","RightLeg"}
--Listen for player added
game.Players.PlayerAdded:Connect(function(Player)
--Listen for character added
Player.CharacterAdded:Connect(function(Character)
--Get the humanoid and a copy of the humanoid description
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:WaitForChild("HumanoidDescription")
local HumanoidDescription = Humanoid:GetAppliedDescription()
--Set all the bodyparts to 0
for _,v in Meshes do HumanoidDescription[v] = 0 end
--Apply the change once the character is parented to the datamodel
Character:GetPropertyChangedSignal("Parent"):Once(function()
Humanoid:ApplyDescription(HumanoidDescription)
end)
end)
end)
Characters can also contain MeshParts to allow them to be “unblocky” without having any CharacterMesh objects inside them, so this code will not always work.
game.Players.PlayerAdded:Connect(function(Plr)
print("Player added")
Plr.CharacterAppearanceLoaded:Connect(function(Chr)
print("Apperance loaded")
for _,child in pairs(Chr:GetChildren()) do
if child:IsA("CharacterMesh") then
print("Character Mesh Destroyed")
child:Destroy()
end
end
end)
end)
It will sometimes not work as players can infact be unblocky without having any character meshes inside of them, the code I posted should avoid that issue.
local Meshes = {"Head","Torso","LeftArm","RightArm","LeftLeg","RightLeg"}
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:WaitForChild("HumanoidDescription")
local HumanoidDescription = Humanoid:GetAppliedDescription()
for _,v in Meshes do HumanoidDescription[v] = 0 end
local Connection = nil
Connection = Character:GetPropertyChangedSignal("Parent"):Connect(function()
if Character.Parent then
Connection:Disconnect()
Humanoid:ApplyDescription(HumanoidDescription)
end
end)
end)
end)
local Enumeration = Enum
local Game = game
local Players = Game:GetService("Players")
local function Default(Humanoid, HumanoidDescription)
for _, BodyPart in ipairs(Enumeration.BodyPart:GetEnumItems()) do
HumanoidDescription[BodyPart.Name] = 0
end
Humanoid:ApplyDescription(HumanoidDescription)
end
local function OnPlayerAdded(Player)
local function OnCharacterAdded(Character)
if not (Player:HasAppearanceLoaded()) then Player.CharacterAppearanceLoaded:Wait() end
local Humanoid = Character:FindFirstChild("Humanoid") or Character:WaitForChild("Humanoid", 10)
if not Humanoid then return end
local HumanoidDescription = Humanoid:GetAppliedDescription()
task.defer(Default, Humanoid, HumanoidDescription)
end
Player.CharacterAdded:Connect(OnCharacterAdded)
end
Players.PlayerAdded:Connect(OnPlayerAdded)