E2 color chat command

i tryed to make a code that is i aim on some thing and write in chat !blue it will change his color to blue but its not work can some one make me the code?

You cannot change other players colours with Expression 2.

not a player a prop or myself(not aiming)

If it’s not a entity or player, I don’t think you can change the colour.



@persist Colours:table
if (first()) {
    runOnChat(1)
    Colours["blue",vector] = vec(0,0,255)
}
if (chatClk(owner()) {
    LS = owner():lastSaid()
    if (LS:index(1) == "!") {
        owner():aimEntity():setColor(Colours[LS:sub(2,LS:length()),vector])
    }
}