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

How do I change the transparency of a model?

I want to make a script that changes the transparency of everything in a model. Is there a way to change it with a single command or do I have to code a separate line for each part?

2 answers

You can use a for loop to get all the parts in the model and change its transparency

for i,v in pairs(model:GetChildren()) do
	v.Transparency = 0.5
end

If you have any instance in a model that don't have the transparency property(like values) then use an if statement to check if they do

There is no way to change the Transparency of a model. However you could change the parent of the model to replicated storage so that you cannot see it.

game.Workspace.Model.Parent = game.ReplicatedStorage

1 comment

1

Jed's solution is good but, you can do this aswell. local Model = workspace.Model for i,v in pairs(Model:GetChildren()) do v.Transparency = 1 end

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