How can I make an object or NPC follow a player?

hello, I was wanting to create an interesting map but I am so new to udon. I was wondering if it was possible to make an object or NPC follow a player around the map but only that player can see it when they click a button, making it invisible to other players.

Is it also possible to add sound to the object or NPC only that player can hear?

NPCs are a pretty big topic, but if you don’t want other players to see them then it can be significantly easier. This is not because the NPCs are “invisible” it’s just because nothing is synced automatically. If you don’t specifically say that you want something synced (either by synced variables or by adding objectsync) then the other players just won’t have any idea what is happening with that object. The same goes for playing sounds - just play the sound. It would be more work to make it so other players do hear the sound.

As for the NPCs, I would recommend watching this video Udon AI: Making Good Bois by Centauri | TLX Spring 2021 - YouTube