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

Clothing returned one piece at a time?

Asked by 5 years ago

This is meant to return the players clothing entirely but instead only returns one piece at a time.

This is a gif explaining what it's doing https://gyazo.com/2d23dda43c1ba3dc684b8fc09f05a3c9

grabclothes = function()
    for i,v in pairs(folder:GetChildren()) do
        if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then
        v.Parent = c
            if c["T60Pants"] and c["T60Shirt"] then
                c.T60Pants:Remove()
                c.T60Shirt:Remove()
            else
                print("NopeShirtPants!")
            end
        end
            if c.Head["Helm"] then
                c.Head.Helm.Middle:WaitForChild("Weld"):Remove()
                c.Head.Helm.Parent = nil
                c.UpperTorso.Chest.Middle:WaitForChild("Weld"):Remove()
                c.UpperTorso.Chest.Parent = nil 
                c.LeftUpperArm.Arm1.Middle:WaitForChild("Weld"):Remove()
                c.LeftUpperArm.Arm1.Parent = nil
                c.RightUpperArm.Arm2.Middle:WaitForChild("Weld"):Remove()
                c.RightUpperArm.Arm2.Parent = nil
            else
                print("NopeArmor!")
            end
            c.Head.Running.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
        end
    end
end
    if Player.Uniform.Value == true then
        print("Equipping Clothes")
        grabclothes()
        c.Humanoid.MaxHealth = 100
        c.Humanoid.Health = 100
        Player.Uniform.Value = false
    elseif Player.Uniform.Value == false then
        print("Removing Clothes")
        removeclothes()
        c.Humanoid.MaxHealth = 200
        c.Humanoid.Health = 200 
        Player.Uniform.Value = true
    end
end

Answer this question