How do I make a local script detect if the local player joined the game

now i need some way i having the script disable? since i have a button in startgui that disables it, but the starterplayerscript is in a different place?

nevermind i found how to do it, thanks!

This looks like a good use of ReplicatedFirst - the title screen script could go there and it should only run once.

ReplicatedFirst scripts are run when the player joins the game, so you shouldn’t need any event with this solution. If you need to wait for the players character to be created, you can use player.CharacterAdded:Wait()

Apologies for being pedantic, but don’t you mean LayerCollector as the API mentions? StarterGui’s version is ResetPlayerGuiOnSpawn which is deprecated and disables resetting on respawn for all Guis. ResetOnSpawn is meant to act as a toggle for a single Gui.

If anyone these were helpful, please mark them as the solution.

That wouldn’t work because localscripts are created after the player has been added.

1 Like

I would suggest doing this on the server-side, you shouldn’t trust the client with such things.
You can use the PlayerAdded event.

this doesn’t seem to work dude