[SOLVED] UI Not Loading When Player Respawns

So i somehow fixed the issue, thanks for the help though everyone!

[Source Code Deleted For Privacy.]

1 Like

Uis get copied into player guis so when you destroy the ui it doesn’t stay there it deletes it completely. Try cloning the ui before you destroy it then show this ui when you need it again. You can also just hide the UI if you don’t need to destroy it, this will be a lot easier then destroying it.

1 Like

The UI is placed into player gui at runtime, since PlayerGui is deleted after the player respawns and since the UI never gets added to the starter gui, i have to call the “:Destroy” function and then call the “.new” function upon player respawn, but “.new” never runs for some reason.

1 Like

Does it actually run or it’s just not working? Can you show what new() does? Also I think it’s :new() not .new()

1 Like

This is a much better way of explaining mine.

1 Like

I’ll show you them when im on my laptop, and yes, its “.new”

I recommend trying this:
in my case my ui is called TwitterCodes
you could always try this:


[:white_check_mark:] ResetOnSpawn
try that

1 Like

basically shows the ui again on spawn of player

1 Like

Unfortunately, “ResetOnSpawn” dosen’t work in the player gui (atleast when parented to player gui on runtime instead of starter gui)

1 Like

I’ve updated the post to explain the code better (with some of the source code provided)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.