How to find the main player in Multiplayer to whom the script belongs

I’m trying to make sure that each player gets their own coordinate values. I still can’t understand how this can be implemented.

At the moment, each player receives the coordinates of all players, and not his own. How can this be done, I will be glad for any help

var Players : []player = array{}
  
OnBegin<override>()<suspends>:void=
  Sleep(10.0)
  set Players = GetPlayspace().GetPlayers()
  loop: 
      Sleep(0.1)
      for (Player : Players, FortCharacter:= Player.GetFortCharacter[], Agent := agent[Player]):
               Print("{FortCharacter.GetTransform().Translation.Z}")

There’s no such thing as “owning a script”, the script is owned by the server, there’s only one instance of it.

So if you want to focus your script on a single player, you’ll have to retrieve this player, you can use (Triggers, Mutator Zones, Player Elimination Device, Player Spawner) events to get a single player at a time. Hope it helps!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.