I want to make the server script to change pants on a rig into an pants with id given by the user.
Everything works besides that id changes for some reason. For ex.
129459077 changes 129459076 if you paste it yourself into pantstemplate, and it works. But the script doesnt change this id and it just leaves rig without the clothing
this is my script setting template:
local product =MarketplaceService:GetProductInfo(id, Enum.InfoType.Asset)
if product.AssetTypeId == 12 then
rig:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=".. id
I checked with printing and it doesn’t change at any point.
Studio does automatically set Clothing to their corresponding Image ID. Ths doesn’t automatically work on dev-scripts. there’s a method with InsertService:LoadAsset(PantsID) and continuing from there but I forgot the exact steps.