the first section of this script works but after the 'else' it doesnt work its suppose to check all the ranking values and if its not equal to the player name, it will make the Check value == true and open == true
after the 'else' its suppose to remove the players name if its on any of the values but this part is completely broken, its suppose to work if open == false but this is completely broken please help me
checked = script.Parent.Checked local player = script.Parent.Parent.Parent.Parent.Parent ranking = {workspace.Values.Line.First, workspace.Values.Line.Second, workspace.Values.Line.Third, workspace.Values.Line.Fourth} open = false script.Parent.MouseButton1Down:connect(function(p) for i,v in pairs (ranking) do if open == false then if ranking[1].Value ~= player.Name and ranking[2].Value ~= player.Name and ranking[3].Value ~= player.Name and ranking[4].Value ~= player.Name then checked.Value = true open = true script.Parent.Text = "CLICK AGAIN TO LEAVE LINE" else if ranking[1].Value == player.Name then ranking[1].Value = "" elseif ranking[2].Value == player.Name then ranking[2].Value = "" elseif ranking[3].Value == player.Name then ranking[3].Value = "" elseif ranking[4].Value == player.Name then ranking[4].Value = "" end end end end end)