I’m going to make this quick. I’ve added a script to my game that does everything I want it too. the only problem is that it displays an error in the output. This kind of bothers me .
Is there a way to get the output to ignore a specific script? If so, how?
Hope you all are having a great day,
– @Mithrandir6440
Sure, thanks for offering. The script is trying to turn all of the children of a model invisible, including unions, by setting .Transparency = 1. It works; the unions and parts turn invisible, but an error pops up, saying that Transparency isn’t a property of unions.
So… I don’t know what to do. I’m not terribly upset about it since it still works, but it makes editing errors in other scripts hard.
for i, child in ipairs(script.Parent:GetChildren()) do
if child.ClassName == ‘Part’ or ‘UnionOperation’ then
child.Transparency = 1
child.CanCollide = false
end
end
here is the script. Like i said, it works, it just puts an error in the output saying: Transparency is not a valid member of Script “Workspace.Base.Buyable.Tower4T.Invisiscript”
The children of script.Parent are both parts and unions
for i, child in ipairs(script.Parent:GetChildren()) do
if child.ClassName == "Part" or child:IsA("BasePart") then
child.Transparency = 1
child.CanCollide = false
end
end
Try this, also
The second conditional statement you’re trying to write isn’t a IsA function (This just basically checks if the child is equal to the given object has)