Created
January 12, 2017 08:23
-
-
Save spotco/d5bc636ffd4ac54f03735d2354d81c23 to your computer and use it in GitHub Desktop.
apply_mesh_texture_recursive.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function recurse(itr) | |
| for _,child in pairs(itr:GetChildren()) do | |
| if child.Name == "TestBuilding1" then | |
| child.Building1Mesh.TextureID = "rbxgameasset://Images/building1_diffuse" | |
| end | |
| if child.Name == "TestBuilding2" then | |
| child.Building2Mesh.TextureID = "rbxgameasset://Images/building1_diffuse" | |
| end | |
| if child.Name == "TestBuilding3" then | |
| child.Building3Mesh.TextureID = "rbxgameasset://Images/building3_diffuse" | |
| end | |
| recurse(child) | |
| end | |
| end | |
| recurse(game.Workspace.Environment.BackgroundBuilding) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment