Are you trying to make the player respawn every time player spawns in? Use CharacterAdded then. And if you’re trying to make the PlayerAdded function respawns the player then do player:LoadCharacter()
Other than that, I really couldn’t identify your problem or error here. Put in more details.
Your thread is extremely unclear, as is your code. Please refer to our category guidelines for more information about posting to this category. You should be as detailed as possible about your problem, one-liner threads aren’t sufficient enough to convey anything.
PlayerAdded isn’t meant to be repeated, it’s an event which gets fired every time a player joins. Your while loop is preventing the PlayerAdded connection line from being reached because it doesn’t terminate. No code after a while loop runs unless it terminates. Furthermore, you should not be controlling PlayerGuis through the server. This is all work you can do straight from the client.