When you're writing a script and you hit a wall, what do you do?

Literal

Script [object-を] am-writing, hit-a-dead-end time [topic-は] how-do?

A writer's craft question. 行き詰まる ('to hit a dead end, to be stuck, to be at an impasse') is a compound verb: 行く ('go') + 詰まる ('be stuck, be blocked') = 'reach a point where you can't go further.' Often used figuratively for mental/creative blocks. The ~て form of 書いている chains it into 行き詰まった as a sequential or situational setup — 'you're writing a script and [then] you hit a wall.' どうする ('what do you do?') is the plain/casual form of どうしますか, asking for a method of response.