How to use PlayerAddedEvent / PlayerRemovedEvent from Playspace?

Has anyone figured out how to use the PlayerAdded/PlayerRemoved events? I’ve been trying to find a way to grab it but cannot find a way.

image

Hey @jstKamui! PlayerAddedEvent() and PlayerRemovedEvent() must both be called as functions. So your code might look something like this:

Self.GetPlayspace().PlayerAddedEvent().Subscribe(YourFunction)

And YourFunction would need to take an argument of type player, like this: YourFunction(Player : player).

Check that you have the correct using statement at the top of your Verse file: using { /Fortnite.com/Playspaces }

Also be sure to check out the Coding Device Interactions tutorial in the Verse documentation to learn more about subscribing and events. Keep in mind that the examples shown there with InteractedWithEvent do not use parentheses because Button allows direct access, instead of requiring a function call.

2 Likes

Oh okay, I see now! I’ll give this a try later tonight. Thanks for the reply!