Were you expecting it to work for decimals? That would be a little tricky because it's not obvious whether to count digits like letters (so the decimal point counts as a "digit" and in 56.78 the 6 is digit 2 and the 7 is digit 4) or whether to count the actual digits consecutively (so the 7 is digit 3).
It's actually tempting to call the ones digit "digit 0" and name digits to the right of the decimal point by negative numbers.
But if you really want a robust treatment of non-integers you have to be prepared to handle things like "45.67e-28" which is too horrible to contemplate. So I'd be happy with just integers, so it's a (very long) one-liner:
Of course I haven't actually tried these, but if I did the math correctly, it's annoying that RTL, which is the "right way" to think about digit numbers (as @ego-lay_atman-bay suggests) has two ugly ±1 blocks, one in each input to ×, whereas LTR doesn't. Of course this reflects the disagreement between how we (correctly) count letter positions in a word and the zero-origin powers of 10.
Edit: I clicked the reply button on @sathvikrias's original post, which is why I said "you" in the first sentence, but of course Discourse thinks it's smarter than I am and didn't put his username up at the top of my reply. :~(
That's very useful in a language in which numbers and strings are distinct types, so if you have a number there's no direct way to extract a digit. But in Snap! you don't have to "convert to string"; it's already a string, as far as the user can see.
And if you want to select digits with one-origin indexing, as we do for strings and for lists, then you have to do the same index-1 thing I did.
Your suggestion would be very helpful, though, if the OP wanted digits in a base other than decimal!
We're going around in circles. What counts as "working" depends on what the OP intends. If thinking of the number as a string of digits-and-maybe-decimal-point, then the digit counting has to count the decimal point. Your solution is good if the OP wants to consider a digit's "position" to be its place value power of 10. But in that case I, at least, wouldn't use the word "position" at all.
Stack overflow is great for when some piece of commercial software gives an incomprehensible error message that demands a magic incantation that you don't have to understand. But it's not always as good when a topic requires actual wisdom, imho.