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

How do you adjust the transparency of a Model?

I have this model in my game of a conveyor belt that I am trying to make invisible on one condition and visible on another. Also, I'm trying to make it not collide. However, when I try to use the following code:

conveyor.Transparency = 1
conveyor.canCollide = false

It says "Transparency is not a valid member of Model." Can anyone help figure out how to do it properly?

1 comment

0

I recommend setting its parent to nil instead.

1 answer

✓ Accepted answer

You're simply trying to adjust the model itself, not it's parts inside. You have to go inside of the model and edit each one of these parts separately(A little annoying, I know)

We'd use a loop so it's nice and easy.

for i,v in pairs (conveyor:GetChildren()) do --Create loop to iterate through all parts inside the model
	v.Transparency = 1 -- v refers to the current part we're addressing in the model
	v.CanCollide = false
end

1 comment

0

This will get an error if an object doesn't have a Transparency property.

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