As you see in the video, I can change to USA but I cannot change to japan…
I’ve placed my script inside of ServerScriptService, and this is the script:
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == "/usa" or "/USA" or "/Usa" then
plr.Team = game.Teams.USA
elseif msg == "/japan" or "/Japan" or "/JAPAN" then
plr.Team = game.Teams.Japan
end
end)
end)
´´´
Can someone please help?
Here, I also recoded it to allow any form of capitalization!
I fixed it, everytime you put a or you have to do msg == “blank” or msg == “blank1” then
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local message = string.lower(msg)
if message == "/usa" then
plr.Team = game.Teams.USA
elseif message == "/japan" then
plr.Team = game.Teams.Japan
end
end)
end)