How do I make my clothing GUI find an asset ID from a catalog ID? Normally, I would just make it do - 1 after the ID, but with how many things are uploaded, that's not really an option anymore. Here's my code:
button = script.Parent.Parent.shirtadd
shirtid = script.Parent.Parent.Parent.Shirt
plr = game.Players.LocalPlayer
char = plr.Character
button.MouseButton1Down:connect(function()
for i,v in pairs (char:children()) do
if v:IsA("Shirt") then
v:Destroy()
end
end
local shirt = Instance.new("Shirt", char)
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=".. shirtid.Text
end)

1 comment
you wrote script.parent.parent.shirt, that never defines the id (sorry if being useless or annoying)