So I have had a script that removes the accessories and packages off the player’s character when they load in and it was working. I haven’t changed it at all but today I logged into studio and it gave me this error:
This is the script that the error comes from
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char:WaitForChild("ForceField"):Destroy()
local humanoid = char.Humanoid or char:WaitForChild("Humanoid")
repeat task.wait() until humanoid
local humanoidDescription = humanoid:GetAppliedDescription()
humanoidDescription.Head = 0
humanoidDescription.Torso = 0
humanoidDescription.RightLeg = 0
humanoidDescription.LeftLeg = 0
humanoidDescription.RightArm = 0
humanoidDescription.LeftArm = 0
humanoid:ApplyDescription(humanoidDescription)
for _, v in pairs(char:GetChildren()) do
if v:IsA("Accessory") and not string.match(v.Name:lower(), "hair") then --Yes I'm aware this is a bad way of removing accessories that aren't hair
v:Destroy()
end
end
end)
end)
I’m just confused cause this code worked before. Did Roblox change something or am I missing something?