TeamColor is not a valid member of player model?

I’m trying to make a simple anti-friendly fire in fe melee kit, it works fine against friendly fire but it does not attack targets on a different/opposite team.
Mainly due to this error
TeamColor is not a valid member of (Player'Model)
Here is my approach:

function DealDamage(Target,Damage,BonusTable,AttackInfo) -- AttackInfo is an optional argument.
	if Target.TeamColor ~= PlayerCharacter.TeamColor then
	if Target:FindFirstChildOfClass("Humanoid") ~= nil then
		Target:FindFirstChildOfClass("Humanoid"):TakeDamage(math.floor(Damage))
		if Target:FindFirstChild("Humanoid").Health <= 0 then
-- rest of script..

I could use

local plrr = game.Players:GetPlayerFromCharacter(PlayerCharacter) 
if Target.Team ~= plrr.Team then

but target is the character model not the player itself.

Then why not also using the GetPlayerFromCharacter for the Target variable?

local CharactersPlayer = game.Players:GetPlayerFromCharacter(Target)
local plrr = game.Players:GetPlayerFromCharacter(PlayerCharacter) 
if plrr.Team ~= CharactersPlayer.Team then
--Continue script