Hello! I know this is a silly question but i need to know the answer. Im trying to make a script run when a player joins and not when the die. Thisis a obby game and i dont want the player have to restart when the die. The script im using is this:
That sounds like a separate issue. It seems like you have your UI set to reset on spawn. That piece of code right there that you posted in OP will only run when a player joins
All other scripts and UIs will run whenever they’re set to. That script right there does one thing: Print "someone joined" when a player joins.
That looks like an issue with having ResetOnSpawn on on a starterGui object. I would have it start in a folder in replicated storage and change it’s parent to the localplayer’s Gui.