Oh, Will You can make a function to get the players in the team, and then make the marker visible only for them .
local myTeam = createTeam( ... )
function getTeamRootElement( team )
if team and isElement( team ) and getElementType( team ) == "team" then
for k,v in ipairs( getPlayersInTeam( team ) ) do
return v
end
end
return false
end
local marker = createMarker( x, y, z, "cylinder", 1, 255, 0, 0, 255, getTeamRootElement( myTeam ) )