so I want to make a function run when the player first joins the world

how can I do that I already tried using advancements

Continue to help post