The code I'm trying to do requires that the player's team is accessed through the chat, from the team color. However, I don't think that it's actually accessing the TeamColor. Any thoughts?
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if msg == "test" and speaker.TeamColor == BrickColor.new("Mulberry") then
end
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end
game.Players.ChildAdded:connect(onPlayerEntered)

2 comments
I'm going to look into this :)
thanks :))