workspace.Gator is a "Model" object. If you select it in the explorer, you will see that it does not have a Transparency property.
Different parts in a model can have different Transparency values (one can be invisible, one can be visible, one can be see-through), so the Model itself can't have one Transparency property.
workspace.Gator doesn't have a .Transparency property. But each of the Part objects in it does.
For example, you could do the following:
wait(10)
workspace.Gator.Head.Transparency = 1
workspace.Gator.Body.Transparency = 1
workspace.Gator.Tail.Transparency = 1
This will work, but it's also a lot of typing.
Models don't have a .Transparency property. So what is it that you mean when you wrote workspace.Gator.Transparency = 1? You mean that each of the parts in workspace.Gator should become transparent.
This means we have to do something for each part inside workspace.Gator. This calls for a for loop.
gatorParts = workspace.Gator:GetChildren()
gatorParts becomes a list of all of the objects (directly) inside the workspace.Gator model -- e.g., it has workspace.Gator.Head, workspace.Gator.Body, workspace.Gator.Tail inside of it.
For each of those things inside, we need to set the .Transparency. You can do this with a for loop:
gatorParts = workspace.Gator:GetChildren()
for index, part in pairs(gatorParts) do
part.Transparency = 1
end
Be careful that if there is some other object inside of the Gator, like a Script, this will be a problem. :GetChildren() gives you a list of all objects inside the Model, not just the parts.
Thus some of the parts could actually not be parts. We have to check that they are parts before modifying part.Transparency (since a Script doesn't have a Transparency, you'd get the same error you got in the script you posted).
gatorParts = workspace.Gator:GetChildren()
for index, child in pairs(gatorParts) do
if child:IsA("BasePart") then
child.Transparency = 1
end
end
2 comments
It's important to know the properties of the objects you're working with http://wiki.roblox.com/index.php?title=Property
Some objects have very different rolls from one another, thus, having very different properties.