Hey all,
I have a script that runs through all parts of a car and sets the texture id (to achieve a livery).
I was testing it out and for the textures that I have specified, none of them work and instead return a grey color.
The current code that I am using is:
local parts = script.Parent:GetChildren()
for i = 1,#parts do
if parts[i].Name == "Color" or parts[i].Name == "Trunk" or parts[i].Name == "Hood" then
if random == 1 then
parts[i].TextureID = "rbxassetid://73737626"
elseif random == 2 then
parts[i].TextureID = "https://www.roblox.com/library/5139177423/HEAT"
elseif random == 3 then
parts[i].TextureID = "https://www.roblox.com/library/5139180460/K9"
elseif random == 4 then
parts[i].TextureID = "https://www.roblox.com/library/5139154759/SUVSMPD-Regular-Patrol"
end
end
end
Please disregard the poor efficiency in using the if statements.
None of the textures I have specified work, instead loading a grey texture as seen below:
My first thoughts were that it was something specifically wrong with each texture. I tried another one off of the decals front page which worked.
This clearly shows that the textures themselves aren’t working but when I tried manually adding them, it did work as seen below:
So I’m a little confused as to why that collection of ones aren’t working when they are inserted, yet other decals off of the front page do and the collection of ones work when manually set.
Thank you for any help that I receive.