How do I make a GUI only open when people are playing the game and not in the Lobby? :D
Use teams and ondied event. Like this
game:GetService('Players').PlayerAdded:connect(function(player)--finds the player player.CharacterAdded:connect(function(character)--activates the function character:WaitForChild("Humanoid").Died:connect(function() print(player.Name .. " has died!") end) end) end)
For more info check this out http://wiki.roblox.com/index.php/Died_(Event)
Also, you want to switch the teams if they died, so on the died event, you change the team.
Scripting Helpers is not a request site, please try it first.
Closed as Not Constructive by Perci1, Spongocardo, and adark
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?