Audio Source on a Network Object plays sound only locally

Hello everyone,
In my game, every Player object has a Network Object attached to it and an Audio Source. When I move a player I call PlayOneShot method for playing the audio.

gameObject.GetComponent<AudioSource>().PlayOneShot(clip);

My problem is, this is only heared on the client that calls this method. Is there a way for all clients to hear the sound of movement whan a player is moving. It could probably be done with RPCs, but is there a different/better way to do it?

Hi there, I think you can use update method for player sound.
I guess, every PlayerObjects have a NetworkTransform component, so you can check player’s position in update method and call “PlayOneShot” if there is changing.
Don’t use “IsOwner or IsServer” condition for this action.

Audio like footsteps don’t need to be synchronized.

If a player instance is moving you just play footsteps audio the same way regardless of whether it’s the local player or not.