I am trying to make a hide team select GUI, but It just won't work and I'm very confused.
I am somewhat of a noob, so please go easy on me!
script.textButton.MouseButton1Down:connect(function() script.Parent,click.play() script.Parent.Text = "Show" script.Parent.Position = "{0, 0},{0.501, 0}" script.Parent.Parent.visible = false end) script.textButton.MouseButton1Down:connect(function() script.Parent,click.play() script.Parent.Text = 'Hide' script.Parent.Position = "{0.086, 0},{0.501, 0}" script.Parent,Parent.visible = true end)
Heres a script I'm trying to use for the team select itself.
game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(3738803) then Parent.visible = true if [Im confused here] end
Basically, this is me trying to make it hide if they're not in the group, but show when they are.
Note: The bottom script goes into an individual button.
First of all, I'll go easy on you. In your first script, you are trying to set the position to a string value. Please change it to: script.Parent.Position = UDim2.new(0,0,0.501,0)
In the 11th line of your first script, you will have to change it to script.Parent.Visible,Parent.Visible = false
. There can be multiple errors in your current line such as script.Parent is not a valid member of "parent"
and visible with a "v" won't be working.
To hide the GUI from all the non-group members, all you have to do is add else Parent.Visible = false
after you've set Parent.Visible = true
for all group members. There is no need to add another if
statement there.
Thank you!