i’ve succesfully hidden the current widget but I want to add this widget to all players and not only one.
When i start my game, only one player can see this widget. So i’m trying to fix that but i have an error when i call AddUiToPlayer… Sorry for this nooby question ![]()
Maybe i have to change something in the function ?
var PlayersUI : []player = GetPlayspace().GetPlayers()
set AllPlayersCount = GetPlayspace().GetPlayers().Length
var PlayersTP : string = ToString("{PlayersTeleported}/{AllPlayersCount}")
AddUIToPlayer(PlayersUI) # This function parameter expects a value of type agent, but this argument is an incompatible value of type []player.
loop:
Sleep(0.1)
if(FirstPlayer : player = PlayersUI[0]):
if(FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
UpdateUI()
AddUIToPlayer(Player : agent) : void =
Print("UI To Player")
if(PlayerUI := GetPlayerUI[player[Player]]):
PlayerUI.AddWidget(CreateUI())