Gui only pop up once?

I would like to make a team change gui, but only appear once when the player joins the game for the first time. I don’t want to be able to change teams after then at all. How would I go about doing this?

2 Likes

Lots of ways to do it. Easiest way would be to have a lobby team that players spawn into, and then give the UI only to that team

So you’d have something like this

Player.CharacterAdded:connect(function(Char)
if Player.TeamColor == (lobbyteamcolor) then
local UI = game.ReplicatedStorage.UI:Clone()
UI.Parent = Player.PlayerGui
end
end)
end)
2 Likes

A way to do this is to go into your ScreenGui and untick the setting “ResetOnSpawn”. This way, your Gui will not pop up again once the Player dies in the game or resets their Character.

Just set your TeamChange Gui to Visible, and if you have ResetOnSpawn off, it should only pop up if you join the game.

1 Like

I think you understand it wrong or me but he wrote how I Understand when you Join the First Time the GUI should pop up but when the Player joins again it don’t should pop up :slight_smile:

Oh, sorry i read that wrong :sweat_smile:

I think it would be possible if you could store a boolean value inside a datastore, and test that value on joining the game. Unfortunately, I am not an expert in that field, but maybe this could help.

1 Like