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

How do I make my clothing GUI find an asset ID from a catalog ID?

Asked by 4 years ago

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)
0
you wrote script.parent.parent.shirt, that never defines the id (sorry if being useless or annoying) super00rocket 27 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

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)

0
No, that's not what I was asking... you see, the clothing gui allows you to enter an asset ID into a textbox where the character's clothes change at the press of a button. I don't want everyone's shirts to be the same. Happy_Hawaiin 0 — 4y
0
hope that helped super00rocket 27 — 4y
0
sorry didnt mean to send that super00rocket 27 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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

0
What do I replace in "name"? I don't have a player file. Happy_Hawaiin 0 — 4y
0
you dont need to change that, the string is linking to the player. You just need to change how many parents it has depending on the amount of frames you have in your gui and such Sabertooth11123 38 — 4y
0
This just changes my clothes to a specific shirt: the whole point of me doing this is to make it so players are able to enter their own IDs. Happy_Hawaiin 0 — 4y
0
Oh, I didnt understand you. I dont know how to do that but you could try making a lot of text buttons with that script inside them?... I used that script for a anime rpg game so yeah.... Sabertooth11123 38 — 4y

Answer this question