If player dies they dont receive the gui again

So I made a script where it gives the player a gui if there in a list but if the player dies they don’t receive it again. this is the script:

local GUI = game:GetService("ReplicatedStorage").Team:Clone()
local Players = game:GetService("Players")

game.Players.PlayerAdded:connect(function(Player)
    local list = {"ForgottenDogYT","iiToastified","Vizulizar","WaterMelonsss1","YelloBand","Difoolum","HZDRT","ROBLO401","twinblade81","Hello34892","Killingboyrock","HahaGetNoobed12313","scipjoe","Lonely_Anomaly","Tycromza"}
    for i, v in pairs(list) do
        if v == Player.Name then
            GUI.Parent = Player.PlayerGui
        end
    end
end)

You have ResetOnSpawn off. Just check that in properties where the screengui is and it should work.

1 Like