MenuGUI does not show up after the character has died?

  1. What do you want to achieve?
    I want the GUI to appear after the character has died, so if the character died the player does not have to rejoin the game instead the menu GUI will show up again!

  2. What is the issue?
    It’s the fact that it just pops up if the player has joined the game but if the player dies in game, the menu GUI does not appear again.
    Video for demonstration: Menu GUI

  3. What solutions have you tried so far?
    The thing is looked on the DevForum, DevHub, tried using the OnCharacterAdded() event, disabled the property ResetOnSpawn and basically everything I was able to do.

Now I need y’alls help. If you want to have a look at it I can send you the .rbxl file since it’s a lot to explain…
But this the script I use. The script is called Spawn and is a parent of the MenuGUI(ScreenGui), so the script basically clones it into the players GUI:
Screenshot (2017)

game:GetService('Players').PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
		print(player.Name .. " has died!")
		local gui = player:WaitForChild("PlayerGui")
		local new = script.MenuGui:Clone()
		new.Parent = gui

	end)
end)
1 Like

In the properties menu for screen GUIs there is an option to reset the GUI on spawn. This is one way of doing it, but another way that would be more complex is to teleport the player instead on making the player lose all its HP. Scripting each thing you want to “kill” the player would need the teleport script which could get annoying so I recommend the reset on spawn thing.

Why not just keep the MenuGui in StarterGui?

1 Like

I tried but it sadly did not work

You need the parent of the screen gui to be the starter GUI folder, not server storage.

Because that also didn’t work so I asked someone who would know how to fix it, so they made it that the GUI gets cloned into the playerGUI

Alright, I’ll try and let you know if it worked

This happens: MenuGUI
It basically doesn’t disappear then if the player chooses a character

1 Like

In the properties menu there is a option to turn on or off reset on spawn just turn it on
NOTE: if you have any scripts that delete the menu it wont work if you move the menu to replicated storage etc… it wont work so if you have a script that does that just change it to make the gui not visible

EDIT: also have it so the ui is visible when they join(i think)
Hope that helped :slight_smile:

Simply put the UI on StarterGui and ENABLE ResetOnSpawn.

The thing is, as the videos show I am using custom models and if I enable it then the player clicks on the button, becomes the animal, the GUI disappears for like 1 frame and then it’s back… the same with disabling

I also tried that! But yeah it causes the menu to appear, the character chooses the animal, the player spawns in and then the menu comes back :frowning:

game:GetService('Players').PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(c)
        c.Humanoid.Died:Connect(function()
            print(player.Name .. " has died!")
            local gui = player:WaitForChild("PlayerGui")
            local new = script.MenuGui:Clone()
            new.Parent = gui
        end)
    end)
end)

If any of its parents are not visible then it wont be try that maybe

Edit: if not i have No idea

Thank you tho, this happened: Menu , it showed up for a few seconds and then disappeared

Also tried :’) It’s like impossible and I thought it would be easy with the Property ResetOnSpawn but I would rather send the .rbxl file because it’s so hard to explain

I have no idea that usually works for me weird

Same tho, but in this case I am using custom models (idek if that’s the problem) but yeah I also don’t get it

waitt… can you show me the screengui properties?

Yeah sure! It looks like this:
Screenshot (2018)