I have been trying to do this for a while (the original script I tried eventually stopped working so now I have been trying to make a system for it) where based on someone's username they will go into a certain role/team.
I have used this (which is a ban list) from a youtube video and tested it on myself (and it works):
local message = "I do not forget..."
local banlist = {
Phaibun = true,
}
game.Players.PlayerAdded:Connect(function(player)
if banlist[player.Name] then
player:Kick(message)
else
print("Do not trust them...")
end
end)
So I tried reworking this to make turn it into what I am trying to do:
local miko = {
WarEspmon19 = true,
WarUmbmon12 = true,
}
game.Players.PlayerAdded:Connect(function(player)
if miko[player.Name] then
playerJoin.Team = "Miko"
else
end
end)
However this does not seem to be working. Any ideas on how to make it work?

1 comment
It worked! Thank you