How to get the sprite of a gameobject in code?

this is the code I’m using to test it. I have a game object in main.collection named “selected_arrow” which has a sprite named sprite as a component of it, the factory creation also works normally (creates one game object with one sprite in it named sprite). The only way I can seem to get one of them to disappear is with the plain string name identifier in line 2.

I suspect if the syntax of msg.url is correct, it’s msg.post that is expecting something else? It’s absolutely insane to me that it’s this complicated. I should not be forced into having everything the built in functions return be transformed into hashes which I then have to transform back into other things…

local sprite_1 = msg.url(nil, hash("selected_arrow"), "sprite")
local sprite_2 = msg.url(nil, "selected_arrow", "sprite")
local id = factory.create("#unit_factory", vmath.vector3(0, 0, 0))
local sprite_3 = msg.url(nil, id, "sprite")

msg.post(sprite_1, "disable") -- does not work
msg.post(sprite_2, "disable") -- works
msg.post(sprite_3, "disable") -- does not work