How i can trigger a function when player is spawned

I try to repair the mods of Uncle Joey’s, (the motd especially), and i got no idea how to trigger a function when the player is fully loaded with the freecam,

If anybody have an idea it would be great !

The global variable worldReadyState equals 2 when the player has completely finished loading in.

You can check this global variable, or use a function locally:

local function onWorldReadyState(state)
  if state == 2 then --player is fully loaded
    --do something
1 Like