How to create a spider walking ai?

so i have a spider that i want to walk on ceiling.i tried everything like linetracing,move to component and other stuffs with no luck.so please anybody tell me how to do so.