1 | if part.Transparency < = . 45 then |
2 | --Code stuff |
3 | end |
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.
1 | local parts = script.Parent:GetChildren() -- Get's the children inside the model |
2 |
3 | if parts.Transparency < = . 45 then |
4 | --Code stuff |
5 | 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.