Hmm, so it's waiting for an event that never occurs. Could well be a bug: I'm fresh out of ideas and no doubt you've noticed that there's precious little documentation around on the subject of applescripting Xcode, which is a shame. Good luck and here's hoping some other bright spark will come...
I ran my own original script again (it's always good to check these things) and I did get a return value, namely {"Build succeeded"}. Perhaps I should have mentioned, though that I ran the script from Script Editor (2.1) while Xcode (2.4) was running at the same time, with an open project...
If you'd looked at the dictionary for Xcode, you'd have seen that the build command needs an object to work on, and if you look a bit further you'll see that that object needs to be a project or a target. So:
tell application "Xcode"
local theResult
set myProject to active project...