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

please help me?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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)
0
I recommend spacing out your code to make it easier for us to read. Can you give us the exact error? Shawnyg 4330 — 9y

Answer this question