Gui message passing syntax

sorry for being so needy recently with my project but this one i REALLY have no idea what’s going on. multiple methods of finding the url for a gui script come out with different ones.

msg.post("#score_proxy", "load")

when i manually load the proxy for the collection it’s in, and then post the url of the gui, it comes out with this.

but then, when you go to where the script is, it is in the scoreboard collection.

where is it? i can’t seem to post a message to it with either-or though
i get this error with the scoreboard collection

and then this error with the game collection

i’ve also tried main, that doesn’t work.
am i doing it the wrong way? i know guis can be a bit weird with ids but still…

Have you tried to post a message just to game:/scoreboard ? As far as I know messages “should” be posted to game objects without referencing particular scripts. Then message goes through all the scripts in game object

Correct. Or actually the message goes to all components of the game object, not only the script components.

I’ll try this then

That’s not what we recommend.
We recommend that you send a message directly to the component that wants it.
It’s redundant to send the same message to the other components of an object that doesn’t need it. And it takes up a little bit of performance.

1 Like

I disagree with you here. It’s not what we recommend?

Oh, sorry, I just confirmed that if you post a message to the game object it is sent to all components, not only script components.

I do recommend to send messages directly to the script, especially if the game object has several components.

1 Like

posting to game object doesn’t work anyway. the url shouldn’t be game/: though.

God I just realised that the url IS scoreboard:/scoreboard#scoreboard. I just saw the error and assumed it was wrong, but the error is that it can’t send not that it doesn’t exist.

1 Like