Hello, I am trying to get a working script that will take textures from a list and randomly select one to be used for the police car’s livery upon spawning in. The texture needs to be applied to 8 MeshParts that are in my Model called Livery. The script itself is located in the driver seat.
Something in my code is missing and/or wrong, I just don’t know what it is. This is the code I have as of now.
local textures = { 0001,0002,0003} -- ID's are just place holders for now
local livery = script.Parent.Parent.Body.Body.Livery:GetChildren()
livery.TextureID = "http://www.roblox.com/asset/?id=" .. textures[math.random(1,#textures)]
end
I don’t have the best scripting ability myself. I appreciate any feedback that could possibly get this working. Hopefully I’ve explained enough information to those of you reading. Thank you.