Recently I made a GUI that will appear only for a certain player, it worked, however, I noticed that on death, the GUI doesn't reappear. Here is what I've tried;
game.Players.PlayerAdded:connect(function(player)
print("A player has entered: " .. player.Name)
local list = {"PICK_MEEEEEE","Tyebel","RobloxDirectYT"}
for i, v in pairs(list) do
if v == player.Name then
player.PlayerGui:WaitForChild("ScreenGui")
player.PlayerGui.ScreenGui.Enabled = true
end
end
end)
First I used that code and tried to trigger a function on death so that when the player died the script would fire itself again. However that backfired and the script stopped working.
Any suggestions or ideas?
