Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change the transparency of a model?

Asked by 3 years ago

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

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

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

Ad
Log in to vote
0
Answered by 3 years ago

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
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 TheBeastMare 3 — 3y

Answer this question