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

I'm trying to make this work but I get "Transparency is not a valid member of Model" what is wrong?

if part.Transparency <= .45 then
--Code stuff
end

3 answers

Is the part a model? Because models don't have transparency. Try referencing the variable as a a Part.

You are changing the transparency of a model not, a part which isn't possible. Create a variable for the parts inside the model and then change their properties.

local parts = script.Parent:GetChildren() -- Get's the children inside the model

if parts.Transparency <= .45 then
--Code stuff
end

I realized I had my code in an area where part was in fact a model so I moved it to the correct position in my code and that fixed the problem.

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