So right now, I have a part of a script that checks for a part, and if the part exists it makes a change to that part.
if pl:FindFirstChild("RadioMesh") then
pl.RadioMesh.Transparency = 1
end
It works fine. However, whenever I check the network, I get an error. It isn't a big deal, but it would be great if this didn't happen as it clutters the output and makes it harder to check for other errors.
So is there a way to go about checking for the existence of something without it outputting an error when it doesn't exist?

6 comments
Network? and no, not without getting into pcalls and going overboard with custom meta userdatas, but there's no reason to do that when you have FindFirstChild()
azarth, what would cause this to error when you have findfirstchild?
Sorry just meant the Network Simulator, mistyped it. Maybe people call it the output? Idk, I just get an error though since it looks for something that doesn't exist. If theres no easy fix thats fine, was just trying.
try adding : if pl:FindFirstChild("RadioMesh") ~= nil then ;;;;;;; elseif pl:FindFirstChild("RadioMesh") == nil then
print ("Nil")
I just realized there was a section with one of these that should have had findfirstancestor, since the its parent isn't always there, and changing that fixed it. Sorry I should have noticed that before!