Script works for new users only after script restart

I have written my first script, but it still has one error.

In itself it works without difficulties, but the script may only be started when all users are in the game.
If new users are added, the script must be restarted.

I have no idea why.

The problem is with the opening of the menu. The rest always works.

should the rest also be relavant, let me know.
Would be great if you notice something


add

local mainMenu = nil

before the function on top.

3 Likes

Thank you very much. That worked!

2 Likes