In a book I'm reading I found this sentence:
I understand it, "I feel there was a children toy which made sounds when you walked, like me"; the character is a robot which hears a sound in her head when she moves around, so that meaning does make sense, but I can't understand why that に after おもちゃ.
As context for what comes next, the character is working in a junkyard with no children around.
I tried looking up meaning for に, like on Jisho, and 6 ("as (i.e. in the role of)") could make sense, but I'm not sure that's the case, nor I'm sure how to insert it in my translation: what would be in the role of a toy? From the sentence it seems that the character is saying that the toy made a sound when the children walked, like her is doing now, not that her herself is in some way "in the role of" a toy - there are not even children where she is.
Beside that meaning, I have no idea what that に could mean; I understand something has to be between おもちゃ and 僕, I'm not sure why に.