Need Help with Shirt/ Pants ID GUI

I am working on a GUI that allows players to enter IDs for shirts and pants. I’m a little stuck on how to go about letting players paste in IDs without having to search for the shirt/pant’s asset id? Here’s what I have so far…

local shirtid = game.Players.LocalPlayer.ClosetHandler.Popups.EvPopup.ShirtInput

function GiveShirtID(plr)
	local char = plr.Character
	local shirt = char.Shirt
	shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=".. shirtid.Text	
end

game.ReplicatedStorage.ShirtID.OnServerEvent:Connect(GiveShirtID)

If this were Roblox maybe 4 years ago, I could just subtract 1 off the input. Unfortunately, that just doesn’t work anymore due to how many people upload on Roblox these days.

I tried searching for similar posts to this but I don’t really know how to describe this so if there is already a post about this I apologize

You can maybe show a preview of the asset to the player.
If you want a library of assets, you can just save all assets entered by the player.

This post is a little confusing but I’m trying to get the gist of it. I assume you mean paste in the ID’s in a GUI? If this is the case you would use a TextBox, and take the values the player inputed from there to form the rest of your script. If this is not the Solution you wanted, I apologize, I’m a little confused. But, Hope this helps!

You’ll have to insert it using InsertService:LoadAsset(assetId). That function will give you a Shirt instance that you can use to get the ShirtTemplate texture.

1 Like