I have a morph base and I use a script to apply both the morph and a GUI to the player when the part is touched. If the player were to reset, having used the morph or not, they will still get the morph's parts and appearance back, but not the GUI.
I use this script to give the GUI using debounce, and it does give the GUI, but only if the player has not reset during the active game.
local part = script.Parent local debounce = false part.Touched:Connect(function(hit) if not debounce then debounce = true local ptt = game.Players:playerFromCharacter(hit.Parent) if ptt == nil then return end local wfp = script.Parent:findFirstChild("ScreenGui"):clone() if wfp == nil then return end wfp.Parent = ptt.PlayerGui wait(0.5) debounce = false end end)
Players testing this have had to rejoin and, in some cases, have the server shut down as the script still wouldn't work after rejoining the active server.
Hello,
To make a GUI stay after a players death, we can use a property of ScreenGui called ResetOnSpawn
. Here's how we'd use it.
(Assuming that the localscript's parent was the ScreenGui.)
ScreenGui = script.Parent ScreenGui.ResetOnSpawn = false
That's all, it makes sure that everything inside the ScreenGui will stay after the character respawns or dies.
You can set the ScreenGui's property, "ResetOnSpawn" to false.
When the game ends and you want to remove the gui, you can hook up a remote event and a local script(to delete it)