Hello. I have been trying to make a team change GUI. The part where it changes the team works fine.
The issue is that I want the GUI to show up after the player dies. It does that with the current script, but only one time.
I have tried looking here, scripting helpers and watched some videos. I can’t seem to find anything that can help me.
I have a localscript and a script. Here is my localscript:
ImmigrantButton.MouseButton1Down:Connect(function(player)
Gui.Enabled = false
RE:FireServer(BrickColor.new(IT)) -- This doesn't matter.
ResetGui:FireServer()
end)
And here is my script. This is the part that doesn’t work.
script.Parent.ResetGuiSpawn.OnServerEvent:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
Char.Humanoid.Died:Connect(function()
wait(5);
Player.PlayerGui.ChangeTeamGui.Enabled = true;
end)
end)
end)
I am new to scripting, so any help would be very appreciated.