Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there an easier way to make multiple textures transparent?

So I've made some simple falling platforms, when they fall the make an invisible clone where they used to be and fall into the void, a few seconds later the clone becomes visible. That all works fine, but I recently added a custom texture and realized that since they have their own transparency they won't turn transparent with the part, do I have to really have to write line for every single individual texture or is there a more efficient way to accomplish this?

1 comment

0

Personally I would have the textures tagged with CollectionService and change them all at once using :GetTagged

1 answer

You can reiterate via a pairs loop through each Texture and set their transparency that way. The code below is a theoretical example, you’ll have to modify it to your liking as you have not provided your own program.

local TexturedParts = workspace.TexturedParts:GetChildren()

for _,Part in pairs(TexturedParts) do
    local Texture = Part:FindFirstChildOfClass("Texture")
    if (Texture) then
        Texture.Transparency = 0
    end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.