My script which sets the ShirtTemplate to a shirt will not work properly.
I am setting the ShirtTemplate to “http://www.roblox.com/asset/?id=16674261991”, but it shows up as completely blank. However, if I set the ShirtTemplate of a rig to the exact same string, it works fine.
When you set an id in studio (not during a playtest) and that id happens to be that you find on the website, Roblox automatically converts it to an another id (if you see the id after you copy paste it you will notice it changes). However that doesn’t happen when a script does it in-game. For that, if the shirt is static and not dynamic, you can simply copy paste it in a shirt instance in studio, wait for the id to change, and put the changed id in the script.
For your case specifically, the id you should put in the script is rbxassetid://16674261915, I found it by simply first copy pasting it in a Shirt instance in studio.
If the id is dynamic (you don’t know it before hand), you can use the following function to figure out the correct id:
--can fail if the API call LoadAsset fails
local function convertId(websiteId: number): number
return game.InsertService:LoadAsset(websiteId).Shirt.ShirtTemplate
end
--http://www.roblox.com/asset/?id=16674261915
print(convertId(16674261991))