Problem with PlayerAddedEvent

Hi,
I would like to know if the PlayerAddedEvent works on your side? Personally no.

Here is my code if you think it’s me

using { /Fortnite.com/Devices }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }

ui := class(creative_device):
    A(Player : player) : void =
        Print("hello")

    OnBegin<override>()<suspends> : void =
        Print("pre")
        Self.GetPlayspace().PlayerAddedEvent().Subscribe(A)
        Print("add")

Thanks for the report. We’ll have a look to see if there’s anything going wrong with the logic there.

I think what might be happening though is the players that are already present don’t trigger that event, and instead it will only be triggered when someone joins an experience in progress. So if you change your code to this you will get a print for all players that are already there and any more that join.

    OnBegin<override>()<suspends> : void =
        Print("pre")

        GetPlayspace().PlayerAddedEvent().Subscribe(A)

        for (Player : GetPlayspace().GetPlayers()):
            A(Player)

        Print("add")
1 Like

for me its also not working, it seems like OnBegin is performed after players have ben added.

Okey thanks