Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

0

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

2 answers

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)

3 comments

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.

0

hope that helped

0

sorry didnt mean to send that

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

4 comments

0

What do I replace in "name"? I don't have a player file.

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

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.

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....

This discussion is preserved as it was. New answers, comments, and votes are closed.