function CheckPlayerExistance(Player)
if game.Players:FindFirstChild(Player)
then
local ExistPlayer = game.Players:FindFirstChild(Player)
print(ExistPlayer.Name.." exists.")
return ExistPlayer
else
print(Player.." is not a Player/Not in the game.")
end
end
function CheckIfPlayerAlive(Player)
if Player.Team ~= game.Teams.Dead
then
return Player
else
print(Player.." is Dead.")
end
end
game.ReplicatedStorage.Remotes.PlayerVoted.OnServerEvent:Connect(function(plr, ChosenPlayer)
CheckIfPlayerAlive(CheckPlayerExistance(ChosenPlayer))
end)
When I run this, the game detects if a player exists, but it doesn't print that the player is in the Team dead, even tho the player is in the Team Dead.

2 comments
You made it check if the player's team is dead, if he's in the dead team then obviously his team is alive
That was not what I meant...