Networking - How do i spawn an object with client authority?

So, i’m trying to learn basic online functionality. But i’ve ran into a brick wall in my progress; i can spawn objects on the server, but they don’t seem to have client authority. I know you can have player objects spawned with client authority automatically when the server / client starts, but that’s not quite what i want. I want to spawn a player or other object some time after the server starts or client connects. I know there’s a method along the lines of NetworkServer.SpawnWithClientAuthority(prefab, connection), but no matter how i try to get the information for the network connection parameter, i get an error. Be it using the simple variable connectionToClient, using (networkmanager object).client.connection, or using a few other methods that i can’t remember right now.

What should i do to get that information? Or should i not be using this method at all? None of the basic networking tutorials i’ve read seem to cover this exact subject. Any help would be appreciated.

https://docs.unity3d.com/ScriptReference/Networking.NetworkServer.SpawnWithClientAuthority.html

https://forum.unity.com/threads/assign-authority-to-local-client-gameobject.371113/

,https://docs.unity3d.com/ScriptReference/Networking.NetworkServer.SpawnWithClientAuthority.html

https://forum.unity.com/threads/assign-authority-to-local-client-gameobject.371113/