so player clicks the buttons and changes his clothes But this Local script is not working. Local Script Is Not Mine. But i tried to fix still dont works so i came here to ask for help.
shirtid = "http://www.roblox.com/asset/?id=478566599" pantsid = "http://www.roblox.com/asset/?id=54361253" button = script.Parent button.MouseButton1Click:Connect(function() player = game.Players.LocalPlayer char = player.Character if char:findFirstChild("Shirt") then char.Shirt.ShirtTemplate = shirtid else a = Instance.new("Shirt", char) a.Name = "Shirt" a.ShirtTemplate = shirtid end if char:findFirstChild("Pants") then char.Pants.PantsTemplate = pantsid else b = Instance.new("Pants", char) b.Name = "Pants" b.PantsTemplate = pantsid end end)
The problem is not the script, when getting clothing id's, you need to subtract one from the Id. For example, your first Id 478566599 should be 478566598