So when you join the game, You are greeted by a choose team GUI. I have all that part sorted out. When You join -Lets say Counter-Terrorists- I want a GUI to come up every time they die. I have the frame and all that stuff ready. its just that the script I did won't work because that was PlayerAdded so when they joined, they would be automatically put into a team. I have changed it, so I need some help on how the script should be so that when a person on a team dies, they get a gui everytime they spawn.
Here is the script I currently have. I know it won't work, but can anyone please edit it so that every time they spawn, they get it. I made it myself so I had annotations in it.
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
if p.TeamColor.Name == "Really blue" then -- If you just want Really blue players having it
p:WaitForChild("PlayerGui")
game.ServerStorage["CT Class"]:clone().Parent = p.PlayerGui
end
end)
end)
So I know this is when player joins, but I need it as when they die it spawns for them every time. IDK why but its not working. There is nothing In the output that would be useful in this question.
Thanks.

2 comments
When I said "so when they joined, they would be automatically put into a team.", I was saying that I did this in my old update of my game. But I changed it to an update where you can choose which team you want to be. Later on im going to add a "Balance Team Script" which will try and keep the teams balanced.
I found the problem. My Frame Was Invisible but this script helped.