Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

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

Asked by
kraigg -2
10 years ago

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

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?

2 answers

Log in to vote
1
Answered by 10 years ago

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.

Ad
Log in to vote
-2
Answered by 10 years ago

Scripting Helpers is not a request site, please try it first.

1
Them Random Downvoters tho ggggyourface23 63 — 10y