The problem is most likely caused by surrounding code. It means that your SelectedObj might have been assigned before in the header of a loop for example. Could it be that your line is part of a for/each loop? Could you post the rest of your code?
Funny that the API documentation does not even list a method FindChild for Transform… but you don’t get an error message on compilation, so it must exist.