This is a script inside a textbutton.For some reasons it doesn't work nor does it give me any errors.It should change my Shirt and Pants.
Char = script.Parent.Parent.Parent.Parent.Character sh = Char.Shirt pa = Char.Pants st = sh.ShirtTemplate pt = pa.PantsTemplate function onClick(mouse) if Char:FindFIrstChild("Shirt") then Char.Shirt:Destroy() end if Char:FindFIrstChild("Pants") then Char.Pants:Destroy() end s = Instance.new("Shirt", Char) s.ShirtTemplate = "http://www.roblox.com/asset/?id=255758532" p = Instance.new("Pants", Char) p.PantsTemplate = "http://www.roblox.com/asset/?id=255758581" script.Parent.Text = "Wear Off" end script.Parent.MouseButton1Click:connect(onClick)
Sometimes Char takes a bit to load, so do this:
Char = script.Parent.Parent.Parent.Parent.Character repeat wait() until Char sh = Char.Shirt pa = Char.Pants st = sh.ShirtTemplate pt = pa.PantsTemplate function onClick(mouse) if Char:FindFIrstChild("Shirt") then Char.Shirt:Destroy() end if Char:FindFIrstChild("Pants") then Char.Pants:Destroy() end s = Instance.new("Shirt", Char) s.ShirtTemplate = "http://www.roblox.com/asset/?id=255758532" p = Instance.new("Pants", Char) p.PantsTemplate = "http://www.roblox.com/asset/?id=255758581" script.Parent.Text = "Wear Off" end script.Parent.MouseButton1Click:connect(onClick)