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

Why wont this work?

Asked by
0ea 0
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
admin = coroutine.create(function()
admins = {"Player1"}
game.Players.PlayerAdded:connect(function(lemon)
wait(3)
if admins[lemon.Name] then
print("test")
end
end)
end)
coroutine.resume(admin)
0
put the script in lua block ._. davness 376 — 9y
0
Just help 0ea 0 — 9y
0
there 0ea 0 — 9y
0
You need to explain exactly what is wrong please, or else it becomes difficult for us to narrow down the problem!!! dragonkeeper467 453 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

I believe your script is overcomplicated. Here is an alternative:

admin = nil
admins = {"user1", "user2"}

game.Players.PlayerAdded:connect(function(lemon)
    for key, value in pairs(admins) do
        if lemon.Name = value then
            print("Hello World!")
        end

    end
end)

If this doesn't work, sorry. Use as much of it as you can. If it does in fact work, let me know!

Ad

Answer this question