Remove delimiter section from filename with Automator
You're doing many things wrong:


If you set AppleScript's text item delimiters to other then its default {}, always reset it to {} when finished with the temporary delimiter.
input is a list and as such you should return a list and do it outside of the repeat loop. 
item 2 within the repeat loop needs to be text item 2, however, anItem within the repeat loop in this use case must also be text, so it needs to be (anItem as text). 
fileName needs to be a list because you are processing a list and you need to return a list.


That said, here's an example Automator workflow with an AppleScript action coded in an example manner of how I'd write the code. Note though, that while it returns a list of the filenames after the $ delimiter, I'm not sure what good it's going to do you as it all depends on additional code not currently present in this example.



AppleScript code for the Run AppleScript action:

on run {input, parameters}
    try
        set AppleScript's text item delimiters to {"$"}
        set theFileNameList to {}
        repeat with thisItem in input
            set the end of theFileNameList to text item 2 of (thisItem as text)
        end repeat
        set AppleScript's text item delimiters to {}
        return theFileNameList
    on error eStr number eNum
        display dialog eStr &amp; " number " &amp; eNum buttons {"OK"} ¬
            default button 1 with icon caution
        set AppleScript's text item delimiters to {}
        return
    end try
end run