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

[Solved] Help with getting people in a table?

Asked by 9 years ago
elseif (msg == "minions die") then
   for i,v in pairs(game.Players:GetChildren()) do
    for i,x in pairs(minions) do
        if v.Name == string.upper(x) then
            x.Character.Humanoid.Health = 0
        end
    end
end

Turns out im stuipid....

elseif (msg == "minions die") then
   for i,v in pairs(game.Players:GetChildren()) do
    for i,x in pairs(minions) do
        if (string.upper(v.Name) == string.upper(x)) then
            v.Character.Humanoid.Health = 0
        end
    end
end

lol

0
This is a bit broad. What is this script trying to achieve? Why did you only show a small snippet of it, shown by the 'elseif' statement? What is 'minions'? Is it another table? And how do you mean "getting people in a table"? You just did that. Redbullusa 1580 — 9y
0
What im trying to do is get the names of the players in the game and if they are in the table minions it will kill them xXUltraAltraXx 20 — 9y
0
Try and replace "x" for "v" in line 5. That's the only input I can really give you. Redbullusa 1580 — 9y

Answer this question