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

How do you make sure that only one text button is visible at a time?

Asked by 4 years ago

Im making a game, with a team choose and when you press the team button, a text button below pops up which says "select" which you press to confirm your team, like in jailbreak. The thing is though I have two of these select buttons and I want the other previous one to disappear when the other one is visible. I've tried but to no avail:



local player = script.Parent.Parent.Parent.Parent.Parent local TeamChoose = script.Parent.Parent script.Parent.MouseButton1Click:Connect(function() script.Parent.TextButton.Visible = false --Text button is the select button script.Parent.Parent.Dark.TextButton.Visible = true end) script.Parent.TextButton.MouseButton1Click:Connect(function() player.Team = game.Teams.Dark TeamChoose:TweenPosition(UDim2.new(0.25, -0,-1, -0),"Out","Quint",1,true) player.Character.Humanoid.Health = 0 end)

Also, with this team change gui the tweening only occurs the first time you change your team.

Thanks

Answer this question