Script to choose "team"?
Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
I have a problem with this script, when i click the button(gui) if the id[d].Value ~= "none", it will make another gui visible but i need it to do this only if ALL the id[d].value ~= "none". Hope you understand
id are StringValue
ui is a screengui
01 | local id = game.Workspace.Guards:GetChildren() |
02 | local player = script.Parent.Parent.Parent.Parent.Parent |
03 | local ui = script.Parent.Parent.Parent.Parent.UI |
04 | local foundplayer = false |
08 | if foundplayer = = false then |
09 | if id [ d ] .Value = = "None" then |
11 | ui.Id.Value = id [ d ] .Name |
12 | id [ d ] .Value = player.Name |
13 | local spawn = game.Workspace.GuSpawns:FindFirstChild( "Spawn" ..d) |
14 | ui.Team.Value = "Guards" |
15 | player.Character.Torso.CFrame = CFrame.new(Vector 3. new(spawn.Position.x, spawn.Position.y + 3 , spawn.Position.z)) |
17 | local ui 2 = ui:GetChildren() |
19 | if ui 2 [ o ] .ClassName = = "Frame" then |
23 | ui.Clock.Visible = true |
24 | ui.Character.Visible = false |
25 | ui.Crafting.Visible = false |
26 | ui.Sections.Character.Visible = false |
27 | ui.Sections.Crafting.Visible = false |
28 | script.Parent.Parent.Visible = false |
30 | if id [ d ] .Value ~ = "None" then |
31 | script.Parent.Parent.Full.Gu.Visible = true |
33 | script.Parent.Parent.Full.Gu.Visible = false |
40 | script.Parent.MouseButton 1 Click:connect(OnClicked) |