Player.Character is always null in server FromSource C#

In the serverside script i has this

public Class1()
        {

            EventHandlers["teleportCommandEvent"] += new Action<Player, string>(TeleportEvent);

        }

        private void TeleportEvent([FromSource] Player player, string obj)
        {
             
        }

The problem is that player.Character is always null.

Make sure you are running onesync

1 Like

OneSync is on in the server.cfg. Do i need to download it or something?

To use entities serversided you need to enable onesync, you can do this by adding +set onesync on as command line parameter to your server start command