Volieb
(Vinny)
October 19, 2020, 12:58am
#1
How could I fetch the Shirt ID from just the Template ID through a script?
I know how to get the Template ID from the Shirt ID , but I am wondering how I can reverse this.
For example, I have a template ID (5706174468) and I want to find the Shirt ID through a script. How can this be done?
Any feedback is appreciated.
1 Like
7z99
(cody)
October 19, 2020, 1:09am
#2
Try using InsertService?
game:GetService('InsertService'):LoadAsset(5706174468).Parent = workspace
That line should parent it to workspace.
1 Like
Volieb
(Vinny)
October 19, 2020, 1:10am
#3
That will create a decal image of the shirt template, but it still does not give me the ID of the shirt that it is the template for.
1 Like
7z99
(cody)
October 19, 2020, 1:13am
#4
Oh, I think I see your issue. I went to the link and it’s a decal of the shirt template, you can just apply that to your shirt item like this:
local myShirt = workspace.Shirt
local myID = 5706174468
myShirt.ShirtTemplate = 'rbxassetid://'..myID
That should work.
1 Like
Volieb
(Vinny)
October 19, 2020, 1:18am
#5
Yes that would work. But what I am trying to do is sell the shirt to the user with the template ID, and to do that I would need the Marketplace Shirt ID, not template. But, I do not know how to find the shirt ID based on just the template ID if that makes sense.
1 Like
7z99
(cody)
October 19, 2020, 1:19am
#6
Ohhh, got it! Thanks for the info. I’ll try and look into that.
1 Like
7z99
(cody)
October 19, 2020, 1:27am
#7
I wasn’t able to get that, however the first code sample here might work:
1 Like
Volieb
(Vinny)
October 19, 2020, 1:42am
#8
Erm I figured it wouldn’t really be possible, just wanted to see if there was something I was missing. Thanks for your help!
1 Like