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:
01 | button = script.Parent.Parent.shirtadd |
02 | shirtid = script.Parent.Parent.Parent.Shirt |
03 | plr = game.Players.LocalPlayer |
04 | char = plr.Character |
05 |
06 |
07 | button.MouseButton 1 Down:connect( function () |
08 | for i,v in pairs (char:children()) do |
09 | if v:IsA( "Shirt" ) then |
10 | v:Destroy() |
11 | end |
12 | end |
13 | local shirt = Instance.new( "Shirt" , char) |
14 | shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=" .. shirtid.Text |
15 | end ) |
just go into the characters properties and change game.Workspace.player.Shirt.templateid (or whatever) = [your shirt id] and there shirt will change, (P.S. i dont think its called template id but write whatever its called)
Idk if this helps but this is the clothing gui script I use in my game (works great)
script: https://pastebin.com/raw/172GcKpb
I have changed the script to work with your gui, well Ive tried at least