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

Would this output a list of player names in hint?*VERY EASY q.)?

Asked by 10 years ago
A.Text = v.Name.. "has got none."

That is just a snippet of code. V. is the players. Would it output this: Overpride, Player2, Player3, Player4, Etcs has got none.

Would it output that? If not, how can I fix it so that it does?

2 answers

Log in to vote
1
Answered by
HexC3D 830 Moderation Voter
10 years ago
names  =  {}
z = game.Players:GetPlayers()
for i= 1,#z do
table.insert(names,z[i].Name)
wait()
A.Text = table.concat(names,',').."has got more"
end

if this helped +1 if this answered your query checkmark.

0
Please read my next reply. Overpride 0 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

But I have this:

function ToolCheck()
    wait(1)
    local Check = game.Players:GetChildren()
    for _,v in pairs(Check) do
        local found = false
        local BKP = v.Backpack:GetChildren()
        for __,x in pairs(BKP) do
            if x.Name == "AK47" then
                found = true
            end
        end
        if found == false then
            A.Text = v.Name.. " has got none."
        end
    end
end

What is wrong with that? I just want it to output "Player1, Player2, Player3 has got none."

Answer this question