Change label of dropped items

Can anyone tell me why this does not work:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

on open dropped_items
	
	tell application "Finder"
		repeat with eachItem in dropped_items
			set label index of eachItem to 6
		end repeat
	end tell
end open

Error I get is:
Finder got an error: Can’t set label index of file “Macintosh HD:Users:thisUser:Documents:Recover.log” to 6.

maybe because you’re using file instead of item

this works for me:

set label index of item some-HFS-path to 3

Here is what I ended up with that works (sets to gray):

on open dropped_items
	tell application "Finder"
		repeat with eachItem in dropped_items
			set hfsPath to eachItem as text
			set label index of item hfsPath to 7
		end repeat
	end tell
end open