When I paste the shirt ID into a shirt manually it works and converts it all into the right stuff. But doing it via code isn’t working.
Please don’t just say ‘find the template id yourself’ or anything like that. I need to get the template ID just from the shirts ID and that’s it. If I have hundreds of shirts to go through I’m not wasting extra time looking for their templates, nor am I gonna paste them into a shirt, copy the template id, and then reverse engineer it all.
The id you’re using is a reference to a shirt object, not the image itself. From the devhub, heres a method of finding the image:
local webURL = "https://www.roblox.com/catalog/1804747/White-Shirt"
local assetId = tonumber(string.match(webURL, "%d+") or 0) -- extract the number
local success, model = pcall(function()
return game:GetService("InsertService"):LoadAsset(assetId)
end)
if success then
model.Parent = workspace
end
You can then do model:GetChildren()[1].ShirtTemplate to find the image id of the inserted shirt.
Not sure why you’re trying to do this on the client? Run a loop of that on the server to get the id of each shirt you’re going to use, store the list somewhere on the client then just reference that if it’s what you’re after.
Using client as it’s creating a UI. UI shows the clothing options, clicking a button changes the clothing on a dummy model. Dummy model is only loaded on the client, as each player can change what their dummy looks like
As I said. You have a list of Shirts, run a loop in studio once to get their ShirtTemplate IDs, print this list into the output and then store it in a clientside value or script for use at runtime.
This has been a work around for me… I was able to work around it by using the HumanoidDescriptions since you can put the actual shirt ID in them…
In my application, I was making a homestore that would use a proxy to get all of the clothing from the group and automatically put it in the game, since it gives the regular ID and not the template IDs, I had to figure out a way to do it…