Server scripts do not run from the PlayerGUI, move the script to ServerScriptService.
Do not add the hit detection in player added. Only do it once on the outter scope and check the player associated with hit:
for _, Part in pairs(InfectionParts:GetChildren()) do
Part.Touched:Connect(function(Hit)
local plr = game.Players:GetPlayerFromCharacter(Hit.Parent)
...
end
You are missing an elseif in there… the way you have the logic with the nested if, it says the player has to be both red and white team at the same time… so this:
if plr.TeamColor == BrickColor.new("Really red") then
print("red!")
elseif plr.TeamColor == BrickColor.new("White") then
print("white!")
end
Don’t forget you probably want to change the player’s team color from white to red.
Lastly, you can’t change the game.StarterGui.InfectMessageGUI.TextLabel you must change the player’s specific GUI. This will require a local script to manipulate. You will want to add a RemoteEvent to fire from the server script that triggers your typing in the local script.