Not sure what's wrong with it; it responds to a fired event. The script is in ServerScriptService it creates the folder and takes away the persons clothing and places them into the folder. But it won't remove the folder and put the clothes back on the person. Any help would be appreciated.
local p = Player repeat wait() until p.Character local c = p.Character folder = Instance.new("Folder",script) folder.Name = ""..Player.Name local function removeclothes() for i,v in pairs(c:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then v.Parent = folder end end end local function grabclothes() for i,v in pairs(folder:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Accessory") then v.Parent = c wait(0.2) folder.Parent = nil end end end if Player.Uniform.Value == true then print("Equipping Clothes") grabclothes() Player.Uniform.Value = false elseif Player.Uniform.Value == false then print("Removing Clothes") removeclothes() Player.Uniform.Value = true end end prtcl.Parent = Player.Character.UpperTorso prtcl.Enabled = true wait(1) prtcl.Enabled = false end end)