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

My change clothes Gui isn't Working, What Needs to be Changed?

Asked by 6 years ago
Edited 6 years ago

The script is not changing the players clothing, its a local script in a text button.

shirtid = "http://www.roblox.com/asset/?id=478566599"
pantsid = "http://www.roblox.com/asset/?id=54361253"
button = script.Parent

button.MouseButton1Click:conect(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)

Answer this question