Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a GUI pop up only when people are out of the Lobby and playing the game?

How do I make a GUI only open when people are playing the game and not in the Lobby? :D

2 answers

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.

1 comment

1

Them Random Downvoters tho

This discussion is preserved as it was. New answers, comments, and votes are closed.