so I’m trying to make it load a shirt from it’s catalog id, if I enter in manually it will load the asset id, but if a script does it it just stays the numbers and will not load
wait(5)
local Player = script.Parent.Parent.Parent
print(Player.Name)
local PrimaryColor = script.Parent.PrimaryColor
local SecondaryColor = script.Parent.SecondaryColor
local character
for i, v3 in pairs(workspace:GetChildren()) do
if v3.Name == Player.Name then
character = v3
end
end
local shirt = character.Shirt
local Clothingids = game.ReplicatedStorage.GradientClothing.Shirt:GetChildren()
function UpdateCLothing()
for i, v in pairs(Clothingids) do
if v.Name == PrimaryColor.Value then
local scs = v:GetChildren()
for i, v2 in pairs(scs) do
if tostring(v2) == tostring(SecondaryColor.Value) then
shirt.ShirtTemplate = tonumber(v2.Value)
end
end
end
end
end
PrimaryColor.Changed:Connect(UpdateCLothing())
SecondaryColor.Changed:Connect(UpdateCLothing())
basically, how can I make a catalog id into and asset id with scripts
For asset id’s to work they have to be “pre-loaded” (I am not quite sure the real name). To see this in action paste a catalogue id into a shirt inside of studio and watch the number magically change (not into “rbxassetid://”…num).
I have done that, and if i do it manually it works and and the shirt is on my character but when a script does it, it stays whatever input you set it to…