So I have a texture in my game that I want to replace, however there are many parts in the workspace that use the texture ID, and it would take hours to replace manually. I’m pretty sure it is possible to find the decendants of the workspace via script, and if they are a texture and use the ID I want to replace, then they will be replaced with the new ID. I don’t really know how I would do this though, can someone help me?
3 Likes
for i, v in ipairs(game:GetDescendants()) do
if v:IsA"Texture" and v.Texture == "The_ID_You_Want_To_Replace_Here" then
v.Texture = "Your_New_ID_Here"
end
end
Run that in your command bar in Roblox studio to change all the old texture IDs to your new ones.
For some reason this makes all of the textures go blank, not sure why this happened.
Textures won’t resize like Decals, maybe play with texture.StudsPerTileU and texture.StudsPerTileV ?
With what did you replace the strings in that code?
Run this script in your Roblox Studio command Bar
for _, v in pairs(game:GetDescendants()) do
if v:IsA("Texture")then
if v.Texture == "rbxassetid://0" then -- Id want to replace here
v.Texture = "rbxassetid://0" -- New Id here
end
end
wait()
end
2 Likes