You'll have to move Luke somewhat close to either droid to shift control to them to be able to open the gate and let a guard in for the rancor to snack on. I'm guesing it is the rancor pit you are talking about as i don't recall a "funny spider" running around.