Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why wont this work?

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)

4 comments

0

put the script in lua block ._.

0

Just help

0

there

0

You need to explain exactly what is wrong please, or else it becomes difficult for us to narrow down the problem!!!

1 answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.