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!
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
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:
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)
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.
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
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
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